some checks for purge

This commit is contained in:
barisusakli
2014-10-31 22:04:09 -04:00
parent d43e8beb60
commit fcc42883ab
5 changed files with 47 additions and 28 deletions

View File

@@ -102,6 +102,10 @@ var async = require('async'),
], callback);
};
Posts.exists = function(pid, callback) {
db.isSortedSetMember('posts:pid', pid, callback);
};
Posts.getPostsByTid = function(tid, set, start, end, uid, reverse, callback) {
Posts.getPidsFromSet(set, start, end, reverse, function(err, pids) {
if(err) {