mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
renamed get category to get categories
This commit is contained in:
@@ -255,7 +255,7 @@ var RDB = require('./redis.js'),
|
||||
Categories.getAllCategories = function(callback, current_user) {
|
||||
RDB.lrange('categories:cid', 0, -1, function(err, cids) {
|
||||
RDB.handle(err);
|
||||
Categories.get_category(cids, callback, current_user);
|
||||
Categories.getCategories(cids, callback, current_user);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -290,7 +290,7 @@ var RDB = require('./redis.js'),
|
||||
|
||||
|
||||
|
||||
Categories.get_category = function(cids, callback, current_user) {
|
||||
Categories.getCategories = function(cids, callback, current_user) {
|
||||
var name = [],
|
||||
description = [],
|
||||
icon = [],
|
||||
|
||||
@@ -141,7 +141,7 @@ var RDB = require('./redis.js'),
|
||||
RDB.smove('categories:' + oldCid + ':tid', 'categories:' + cid + ':tid', tid, function(err, result) {
|
||||
if (!err && result === 1) {
|
||||
RDB.set('tid:' + tid + ':cid', cid);
|
||||
categories.get_category([cid], function(data) {
|
||||
categories.getCategories([cid], function(data) {
|
||||
RDB.set('tid:' + tid + ':category_name', data.categories[0].name);
|
||||
RDB.set('tid:' + tid + ':category_slug', data.categories[0].slug);
|
||||
});
|
||||
|
||||
@@ -346,7 +346,7 @@ marked.setOptions({
|
||||
// in future it may be possible to add topics to several categories, so leaving the door open here.
|
||||
RDB.sadd('categories:' + category_id + ':tid', tid);
|
||||
RDB.set('tid:' + tid + ':cid', category_id);
|
||||
categories.get_category([category_id], function(data) {
|
||||
categories.getCategories([category_id], function(data) {
|
||||
RDB.set('tid:' + tid + ':category_name', data.categories[0].name);
|
||||
RDB.set('tid:' + tid + ':category_slug', data.categories[0].slug);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user