mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-01 21:30:30 +01:00
fix: tests
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user