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

v1.18.x
Julian Lam 12 years ago
parent 6df57c4a9b
commit 740cf13e8d

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

@ -206,10 +206,21 @@ marked.setOptions({
Topics.getTitle = function(tid, callback) { Topics.getTitle = function(tid, callback) {
RDB.get('tid:' + tid + ':title', function(err, title) { RDB.get('tid:' + tid + ':title', function(err, title) {
console.log(tid, title);
callback(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) { 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 // 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); RDB.sadd(schema.topics(tid).read_by_uid, uid);

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

Loading…
Cancel
Save