mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-07 02:16:29 +02:00
fix dismissAllFlags
This commit is contained in:
@@ -87,7 +87,12 @@ module.exports = function(Posts) {
|
||||
};
|
||||
|
||||
Posts.dismissAllFlags = function(callback) {
|
||||
db.delete('posts:flagged', callback);
|
||||
db.getSortedSetRange('posts:flagged', 0, -1, function(err, pids) {
|
||||
if (err) {
|
||||
return callback(err);
|
||||
}
|
||||
async.eachLimit(pids, 50, Posts.dismissFlag, callback);
|
||||
});
|
||||
};
|
||||
|
||||
Posts.getFlags = function(set, uid, start, stop, callback) {
|
||||
|
||||
Reference in New Issue
Block a user