mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-06-23 07:50:39 +02:00
fix(socket.io): update getPosts controller to return object containing posts instead of straight array
This commit is contained in:
@@ -42,7 +42,7 @@ Categories.getTopicCount = async (req, res) => {
|
|||||||
|
|
||||||
Categories.getPosts = async (req, res) => {
|
Categories.getPosts = async (req, res) => {
|
||||||
const posts = await api.categories.getPosts(req, { ...req.params });
|
const posts = await api.categories.getPosts(req, { ...req.params });
|
||||||
helpers.formatApiResponse(200, res, posts);
|
helpers.formatApiResponse(200, res, { posts });
|
||||||
};
|
};
|
||||||
|
|
||||||
Categories.getChildren = async (req, res) => {
|
Categories.getChildren = async (req, res) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user