if a post is purged, remove it from flagged posts as well

This commit is contained in:
barisusakli
2014-10-27 21:44:15 -04:00
parent d6c17d5cae
commit f95777f474

View File

@@ -116,7 +116,7 @@ module.exports = function(Posts) {
deletePostFromUsersVotes(pid, next);
},
function(next) {
db.sortedSetRemove('posts:pid', pid, next);
db.sortedSetsRemove(['posts:pid', 'posts:flagged'], pid, next);
},
], function(err) {
if (err) {