pass array to groups.destroy

pass array to db.sortedSetRemove
This commit is contained in:
Barış Soner Uşaklı
2018-03-17 19:55:23 -04:00
parent 55b872fe3e
commit fde44cb9b9
3 changed files with 27 additions and 13 deletions

View File

@@ -96,16 +96,10 @@ function deleteUserNids(nids, uid, callback) {
if (!nids.length) {
return setImmediate(callback);
}
async.parallel([
function (next) {
db.sortedSetRemove('uid:' + uid + ':notifications:read', nids, next);
},
function (next) {
db.sortedSetRemove('uid:' + uid + ':notifications:unread', nids, next);
},
], function (err) {
callback(err);
});
db.sortedSetRemove([
'uid:' + uid + ':notifications:read',
'uid:' + uid + ':notifications:unread',
], nids, callback);
}
function getNotifications(uid, start, stop, callback) {