updated less-middleware to 1.1.12 (fixing odd regression with LESS package update). Fixed issue where editing of posts was wonky because the title was being grabbed incorrectly

This commit is contained in:
Julian Lam
2013-06-11 13:58:02 -04:00
parent 6df57c4a9b
commit 740cf13e8d
3 changed files with 13 additions and 2 deletions

View File

@@ -23,7 +23,7 @@
"passport-twitter": "0.1.4",
"passport-google-oauth": "0.1.5",
"passport-facebook": "0.1.5",
"less-middleware": "0.1.11",
"less-middleware": "0.1.12",
"marked": "0.2.8",
"bcrypt": "0.7.5",
"node-gyp": "0.9.5",

View File

@@ -206,10 +206,21 @@ marked.setOptions({
Topics.getTitle = function(tid, callback) {
RDB.get('tid:' + tid + ':title', function(err, title) {
console.log(tid, title);
callback(title);
});
}
Topics.getTitleByPid = function(pid, callback) {
RDB.get('pid:' + pid + ':tid', function(err, tid) {
if (!err) {
Topics.getTitle(tid, function(title) {
callback(title);
});
} else callback('Could not grab title');
});
}
Topics.markAsRead = function(tid, uid) {
// there is an issue with this fn. if you read a topic that is previously read you will mark the category as read anyways - there is no check
RDB.sadd(schema.topics(tid).read_by_uid, uid);

View File

@@ -336,7 +336,7 @@ var SocketIO = require('socket.io').listen(global.server, { log:false }),
});
},
function(next) {
topics.getTitle(data.pid, function(title) {
topics.getTitleByPid(data.pid, function(title) {
next(null, title);
});
}