fix: tests

v1.18.x
Barış Soner Uşaklı 5 years ago
parent 8d8117ffa1
commit 69fb15276c

@ -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);

Loading…
Cancel
Save