Skip to content

Node.js based forum software built for the modern web

slight variable name changes & remove unused var from getPostsByPids, removed underscore dependency

Andrew Darquid2b858c997ff
diff --git a/src/posts.js b/src/posts.js
index 82c7ad30bb..c061adb55a 100644
--- a/src/posts.js
+++ b/src/posts.js
@@ -158,8 +158,6 @@ var RDB = require('./redis.js'),
/* getPostsByPids using redis's multi pipeline */
Posts.getPostsByPids = function(pids, callback) {
var posts = []
- var new_pids = []
-
var multi = RDB.multi();
for (v in pids) {
@@ -168,9 +166,7 @@ var RDB = require('./redis.js'),
}
multi.exec(function (err, replies) {
- var pids = replies
- async.eachSeries(pids, function(pid, _callback) {
- var postData = pid
+ async.eachSeries(replies, function(postData, _callback) {
if(postData) {
postData.relativeTime = utils.relativeTime(postData.timestamp);
postData.post_rep = postData.reputation;