mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
refactor(socket.io): deprecate categories.getTopicCount in favour of api.categories.getTopicCount
This commit is contained in:
@@ -77,6 +77,11 @@ categoriesAPI.delete = async function (caller, { cid }) {
|
||||
});
|
||||
};
|
||||
|
||||
categoriesAPI.getTopicCount = async (caller, { cid }) => {
|
||||
const count = await categories.getCategoryField(cid, 'topic_count');
|
||||
return { count };
|
||||
};
|
||||
|
||||
categoriesAPI.getPosts = async (caller, { cid }) => await categories.getRecentReplies(cid, caller.uid, 0, 4);
|
||||
|
||||
categoriesAPI.getPrivileges = async (caller, { cid }) => {
|
||||
|
||||
Reference in New Issue
Block a user