Node.js based forum software built for the modern web
fix(socket.io): update getPosts controller to return object containing posts instead of straight array
Julian Lam54000aabf5d3
diff --git a/src/controllers/write/categories.js b/src/controllers/write/categories.jsindex e068f06305..00b90d47dd 100644--- a/src/controllers/write/categories.js+++ b/src/controllers/write/categories.js@@ -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) => {