mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-22 00:10:25 +01:00
callback
This commit is contained in:
@@ -310,12 +310,10 @@ var
|
||||
emitter.on('event:newpost', User.onNewPostMade);
|
||||
|
||||
User.incrementUserPostCountBy = function(uid, value, callback) {
|
||||
callback = callback || function() {};
|
||||
User.incrementUserFieldBy(uid, 'postcount', value, function(err, newpostcount) {
|
||||
if (err) {
|
||||
if(typeof callback === 'function') {
|
||||
callback(err);
|
||||
}
|
||||
return;
|
||||
return callback(err);
|
||||
}
|
||||
db.sortedSetAdd('users:postcount', newpostcount, uid, callback);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user