mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-04 14:50:47 +01:00
dont make db call if guest
This commit is contained in:
@@ -8,6 +8,9 @@ var posts = require('../posts');
|
||||
|
||||
module.exports = function (Topics) {
|
||||
Topics.getUserBookmark = function (tid, uid, callback) {
|
||||
if (!parseInt(uid, 10)) {
|
||||
return callback(null, null);
|
||||
}
|
||||
db.sortedSetScore('tid:' + tid + ':bookmarks', uid, callback);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user