mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-05 23:47:46 +02:00
load category parents and childrens in one call
add more missing guest/spider checks
This commit is contained in:
@@ -7,10 +7,16 @@ var categories = require('../categories');
|
||||
|
||||
module.exports = function (User) {
|
||||
User.getIgnoredCategories = function (uid, callback) {
|
||||
if (parseInt(uid, 10) <= 0) {
|
||||
return setImmediate(callback, null, []);
|
||||
}
|
||||
db.getSortedSetRange('uid:' + uid + ':ignored:cids', 0, -1, callback);
|
||||
};
|
||||
|
||||
User.getWatchedCategories = function (uid, callback) {
|
||||
if (parseInt(uid, 10) <= 0) {
|
||||
return setImmediate(callback, null, []);
|
||||
}
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
async.parallel({
|
||||
|
||||
Reference in New Issue
Block a user