check uid

v1.18.x
barisusakli 11 years ago
parent 576081e25f
commit 6ac8d9d349

@ -443,10 +443,16 @@ var
}; };
User.ignoreCategory = function(uid, cid, callback) { User.ignoreCategory = function(uid, cid, callback) {
if (!uid) {
return callback();
}
db.sortedSetAdd('uid:' + uid + ':ignored:cids', Date.now(), cid, callback); db.sortedSetAdd('uid:' + uid + ':ignored:cids', Date.now(), cid, callback);
}; };
User.watchCategory = function(uid, cid, callback) { User.watchCategory = function(uid, cid, callback) {
if (!uid) {
return callback();
}
db.sortedSetRemove('uid:' + uid + ':ignored:cids', cid, callback); db.sortedSetRemove('uid:' + uid + ':ignored:cids', cid, callback);
}; };

Loading…
Cancel
Save