v1.18.x
barisusakli 11 years ago
parent 37115ea3d6
commit f562caaa61

@ -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);
});

Loading…
Cancel
Save