mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 03:26:04 +01:00
change to .exists
This commit is contained in:
@@ -21,7 +21,7 @@ require('./recentreplies')(Categories);
|
||||
require('./update')(Categories);
|
||||
|
||||
Categories.exists = function (cid, callback) {
|
||||
db.isSortedSetMember('categories:cid', cid, callback);
|
||||
db.exists('category:' + cid, callback);
|
||||
};
|
||||
|
||||
Categories.getCategoryById = function (data, callback) {
|
||||
|
||||
@@ -30,7 +30,7 @@ require('./diffs')(Posts);
|
||||
require('./uploads')(Posts);
|
||||
|
||||
Posts.exists = function (pid, callback) {
|
||||
db.isSortedSetMember('posts:pid', pid, callback);
|
||||
db.exists('post:' + pid, callback);
|
||||
};
|
||||
|
||||
Posts.getPidsFromSet = function (set, start, stop, reverse, callback) {
|
||||
|
||||
@@ -34,7 +34,7 @@ require('./bookmarks')(Topics);
|
||||
require('./merge')(Topics);
|
||||
|
||||
Topics.exists = function (tid, callback) {
|
||||
db.isSortedSetMember('topics:tid', tid, callback);
|
||||
db.exists('topic:' + tid, callback);
|
||||
};
|
||||
|
||||
Topics.getTopicsFromSet = function (set, uid, start, stop, callback) {
|
||||
|
||||
@@ -112,7 +112,7 @@ User.getStatus = function (userData) {
|
||||
};
|
||||
|
||||
User.exists = function (uid, callback) {
|
||||
db.isSortedSetMember('users:joindate', uid, callback);
|
||||
db.exists('user:' + uid, callback);
|
||||
};
|
||||
|
||||
User.existsBySlug = function (userslug, callback) {
|
||||
|
||||
Reference in New Issue
Block a user