@ -128,7 +128,7 @@ var RDB = require('./redis.js'),
}
function hasReadTopic(next) {
topics.hasReadTopics([topicData.tid], current_user, function(hasRead) {
topics.hasReadTopic(topicData.tid, current_user, function(hasRead) {
next(null, hasRead);
});
@ -245,6 +245,18 @@ marked.setOptions({
Topics.hasReadTopic = function(tid, uid, callback) {
RDB.sismember(schema.topics(tid).read_by_uid, uid, function(err, hasRead) {
if(err === null) {
callback(hasRead);
else {
console.log(err);
callback(false);
Topics.getTeasers = function(tids, callback) {
var requests = [];
if (Array.isArray(tids)) {