mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 23:30:36 +01:00
use bind
This commit is contained in:
@@ -338,7 +338,7 @@ Flags.create = function (type, id, uid, reason, timestamp, callback) {
|
||||
if (type === 'post') {
|
||||
tasks.push(async.apply(db.sortedSetAdd.bind(db), 'flags:byPid:' + id, timestamp, flagId)); // by target pid
|
||||
if (targetUid) {
|
||||
tasks.push(async.apply(db.sortedSetIncrBy, 'users:flags', 1, targetUid));
|
||||
tasks.push(async.apply(db.sortedSetIncrBy.bind(db), 'users:flags', 1, targetUid));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user