fix(socket.io): update getPosts controller to return object containing posts instead of straight array

This commit is contained in:
Julian Lam
2023-10-24 13:55:00 -04:00
parent f279bca038
commit 54000aabf5

View File

@@ -42,7 +42,7 @@ Categories.getTopicCount = async (req, res) => {
Categories.getPosts = async (req, res) => {
const posts = await api.categories.getPosts(req, { ...req.params });
helpers.formatApiResponse(200, res, posts);
helpers.formatApiResponse(200, res, { posts });
};
Categories.getChildren = async (req, res) => {