changes to leaveAllGroups

Groups.destroy can take an array of groupnames
Groups.leave can take an array of groupnames
db.incrObjectField/decrObjectField can take an array of keys
db.sortedSetRemove can take an array of keys and values
db.setRemove can take an array of keys
This commit is contained in:
Barış Soner Uşaklı
2018-03-17 18:49:33 -04:00
parent ed3dd1cc25
commit 6a9a73c86c
13 changed files with 266 additions and 81 deletions

View File

@@ -384,7 +384,7 @@ module.exports = function (db, module) {
if (!Array.isArray(keys) || !keys.length) {
return callback(null, []);
}
db.collection('objects').find({ _key: { $in: keys } }, { _id: 0, _key: 1, value: 1 }).toArray(function (err, data) {
db.collection('objects').find({ _key: { $in: keys } }, { _id: 0, _key: 1, value: 1 }).sort({ score: 1 }).toArray(function (err, data) {
if (err) {
return callback(err);
}