posts:votes sorted set

This commit is contained in:
psychobunny
2017-02-27 15:27:07 -05:00
parent 4a851e0a85
commit 86a8b8ab93
2 changed files with 48 additions and 1 deletions

View File

@@ -248,6 +248,9 @@ var plugins = require('./plugins');
},
], next);
},
function (next) {
db.sortedSetAdd('posts:votes', postData.votes, postData.pid, next);
},
function (next) {
Posts.setPostFields(postData.pid, { upvotes: postData.upvotes, downvotes: postData.downvotes }, next);
},