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

This commit is contained in:
Julian Lam
2023-10-23 15:08:52 -04:00
parent d7c6b3d60e
commit 010727f5cb
5 changed files with 49 additions and 33 deletions

View File

@@ -45,6 +45,12 @@ Categories.getPosts = async (req, res) => {
helpers.formatApiResponse(200, res, posts);
};
Categories.getChildren = async (req, res) => {
const { cid } = req.params;
const { start } = req.query;
helpers.formatApiResponse(200, res, await api.categories.getChildren(req, { cid, start }));
};
Categories.setWatchState = async (req, res) => {
const { cid } = req.params;
let { uid, state } = req.body;