mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 20:16:04 +01:00
closes #4801
This commit is contained in:
@@ -228,7 +228,11 @@ var plugins = require('./plugins');
|
||||
async.parallel([
|
||||
function (next) {
|
||||
if (postData.uid) {
|
||||
db.sortedSetAdd('uid:' + postData.uid + ':posts:votes', postData.votes, postData.pid, next);
|
||||
if (postData.votes > 0) {
|
||||
db.sortedSetAdd('uid:' + postData.uid + ':posts:votes', postData.votes, postData.pid, next);
|
||||
} else {
|
||||
db.sortedSetRemove('uid:' + postData.uid + ':posts:votes', postData.pid, next);
|
||||
}
|
||||
} else {
|
||||
next();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user