refactor(socket.io): deprecate categories.getTopicCount in favour of api.categories.getTopicCount

This commit is contained in:
Julian Lam
2023-10-19 11:26:00 -04:00
parent 96046373da
commit c442b6e662
8 changed files with 47 additions and 25 deletions

View File

@@ -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 }) => {