Node.js based forum software built for the modern web
change to .exists
Baris Usakli12f3f56b01f3
diff --git a/src/categories/index.js b/src/categories/index.jsindex 062fd2a6bf..4140bf154f 100644--- a/src/categories/index.js+++ b/src/categories/index.js@@ -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) {diff --git a/src/posts/index.js b/src/posts/index.jsindex fee8ce4af7..3c7ee4d3fc 100644--- a/src/posts/index.js+++ b/src/posts/index.js@@ -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) {diff --git a/src/topics/index.js b/src/topics/index.jsindex 799cf165d5..0b54321eb1 100644--- a/src/topics/index.js+++ b/src/topics/index.js@@ -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) {diff --git a/src/user/index.js b/src/user/index.jsindex c17597ff38..d78184f8bb 100644--- a/src/user/index.js+++ b/src/user/index.js@@ -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) {