Node.js based forum software built for the modern web
fix: tests
Barış Soner Uşaklı69fb15276c14
diff --git a/public/openapi/read.yaml b/public/openapi/read.yamlindex 33708891a9..4a795a0539 100644--- a/public/openapi/read.yaml+++ b/public/openapi/read.yaml@@ -634,7 +634,42 @@ paths:content:application/json:schema:- $ref: components/schemas/CommonProps.yaml#/CommonProps+ allOf:+ - type : object+ properties:+ categories:+ type: array+ items:+ type: object+ properties:+ cid:+ type: number+ description: A category identifier+ name:+ type: string+ disabled:+ type: number+ icon:+ type: string+ link:+ type: string+ parentCid:+ type: number+ description: The category identifier for the category that is the immediate+ ancestor of the current category+ color:+ type: string+ bgColor:+ type: string+ backgroundImage:+ type: string+ nullable: true+ imageClass:+ type: string+ children:+ type: array+ description: Array of children categories+ - $ref: components/schemas/CommonProps.yaml#/CommonProps"/api/admin/manage/categories/{category_id}":get:tags:diff --git a/src/controllers/admin/categories.js b/src/controllers/admin/categories.jsindex bbe2104c8a..f6b6ab7fae 100644--- a/src/controllers/admin/categories.js+++ b/src/controllers/admin/categories.js@@ -47,7 +47,7 @@ categoriesController.getAll = async function (req, res) {// Categories list will be rendered on client side with recursion, etc.const cids = await categories.getAllCidsFromSet('categories:cid');const fields = [- 'cid', 'name', 'level', 'icon', 'parentCid', 'disabled', 'link',+ 'cid', 'name', 'icon', 'parentCid', 'disabled', 'link','color', 'bgColor', 'backgroundImage', 'imageClass',];const categoriesData = await categories.getCategoriesFields(cids, fields);diff --git a/src/socket.io/admin/categories.js b/src/socket.io/admin/categories.jsindex 7c621c9fa9..483a82c956 100644--- a/src/socket.io/admin/categories.js+++ b/src/socket.io/admin/categories.js@@ -23,7 +23,7 @@ Categories.getAll = async function () {winston.warn('[deprecated] admin.categories.getAll deprecated, data is returned in the api route');const cids = await categories.getAllCidsFromSet('categories:cid');const fields = [- 'cid', 'name', 'level', 'icon', 'parentCid', 'disabled', 'link',+ 'cid', 'name', 'icon', 'parentCid', 'disabled', 'link','color', 'bgColor', 'backgroundImage', 'imageClass',];const categoriesData = await categories.getCategoriesFields(cids, fields);