closes #742, closes #741

This commit is contained in:
Baris Soner Usakli
2014-01-07 17:30:29 -05:00
parent 6f94acd0f2
commit a4ae9c70df
8 changed files with 158 additions and 26 deletions

View File

@@ -96,7 +96,7 @@ var db = require('./database'),
};
Posts.getPostsByTid = function(tid, start, end, callback) {
db.getListRange('tid:' + tid + ':posts', start, end, function(err, pids) {
db.getSortedSetRange('tid:' + tid + ':posts', start, end, function(err, pids) {
if(err) {
return callback(err);
}
@@ -325,7 +325,7 @@ var db = require('./database'),
postData.relativeTime = new Date(parseInt(postData.timestamp,10)).toISOString();
postData.relativeEditTime = parseInt(postData.edited, 10) !== 0 ? (new Date(parseInt(postData.edited, 10)).toISOString()) : '';
} catch(e) {
winston.err('invalid time value');
require('winston').err('invalid time value');
}
postTools.parse(postData.content, function(err, content) {