mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-08 21:50:40 +01:00
typo
This commit is contained in:
@@ -489,16 +489,14 @@ Upgrade.upgrade = function (callback) {
|
||||
|
||||
require('./batch').processSortedSet('posts:pid', function (pids, next) {
|
||||
async.each(pids, function (pid, next) {
|
||||
async.each(pids, function (pid, next) {
|
||||
db.getObjectFields('post:' + pid, ['upvotes', 'downvotes'], function (err, postData) {
|
||||
if (err || !postData) {
|
||||
return next(err);
|
||||
}
|
||||
db.getObjectFields('post:' + pid, ['upvotes', 'downvotes'], function (err, postData) {
|
||||
if (err || !postData) {
|
||||
return next(err);
|
||||
}
|
||||
|
||||
var votes = parseInt(postData.upvotes || 0, 10) - parseInt(postData.downvotes || 0, 10);
|
||||
db.sortedSetAdd('posts:votes', votes, pid, next);
|
||||
});
|
||||
}, next);
|
||||
var votes = parseInt(postData.upvotes || 0, 10) - parseInt(postData.downvotes || 0, 10);
|
||||
db.sortedSetAdd('posts:votes', votes, pid, next);
|
||||
});
|
||||
}, next);
|
||||
}, {}, function (err) {
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user