mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
closes #2074
when new notifications are pushed to uids clear their old notifications.
This commit is contained in:
@@ -79,6 +79,12 @@ module.exports = function(db, module) {
|
||||
db.collection('objects').remove({_key: {$in: keys}, value: value}, callback);
|
||||
};
|
||||
|
||||
module.sortedSetsRemoveRangeByScore = function(keys, min, max, callback) {
|
||||
callback = callback || helpers.noop;
|
||||
db.collection('objects').remove({_key: {$in: keys}, score: {$lte: max, $gte: min}}, function(err) {
|
||||
callback(err);
|
||||
});
|
||||
};
|
||||
|
||||
function getSortedSetRange(key, start, stop, sort, withScores, callback) {
|
||||
db.collection('objects').find({_key:key}, {fields: {_id: 0, value: 1, score: 1}})
|
||||
|
||||
Reference in New Issue
Block a user