mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 11:35:55 +01:00
@@ -738,6 +738,21 @@
|
||||
});
|
||||
}
|
||||
|
||||
module.listRemoveAll = function(key, value, callback) {
|
||||
db.collection('objects').update({_key: key }, { $pull: { array: value } }, function(err, result) {
|
||||
if(err) {
|
||||
if(callback) {
|
||||
return callback(err);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(callback) {
|
||||
callback(null, result);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
module.getListRange = function(key, start, stop, callback) {
|
||||
|
||||
if(stop === -1) {
|
||||
|
||||
Reference in New Issue
Block a user