topics should be marked read correctly if you are already in it

This commit is contained in:
Baris Soner Usakli
2014-01-23 15:46:39 -05:00
parent 47c32738a6
commit 824c5072e8
6 changed files with 100 additions and 85 deletions

View File

@@ -90,9 +90,7 @@ var db = require('./database'),
next(null, postData);
});
}
], function(err, postData) {
callback(err, postData);
});
], callback);
};
Posts.getPostsByTid = function(tid, start, end, callback) {
@@ -222,10 +220,10 @@ var db = require('./database'),
post.editorname = editorData.username;
post.editorslug = editorData.userslug;
callback();
callback(null, post);
});
} else {
callback();
callback(null, post);
}
});
});