Fixed delete-many schema
MODIFY
src/assets/server/rest/v1/schemas/tag/tags-delete.json
src/assets/server/rest/v1/schemas/tag/tags-delete.json
"description": "",
"type": "object",
"properties": {
- "tagIDs": {
+ "tagsIDs": {
"type": "array",
"items": {
"$ref": "tag.json#/definitions/id"
}
},
"required": [
- "tagIDs"
+ "tagsIDs"
]
}

MODIFY
src/server/rest/v1/service/TagService.ts
src/server/rest/v1/service/TagService.ts
@@ -63,7 +63,7 @@ export default class TagService {
public static async handleDeleteTags(action: ServerAction, req: Request, res: Response, next: NextFunction): Promise<void> {
// Filter
- const tagsIDs = TagValidator.getInstance().validateTagsDelete(req.body).tagIDs;
+ const tagsIDs = TagValidator.getInstance().validateTagsDelete(req.body).tagsIDs;
// Delete
const result = await TagService.deleteTags(req.tenant, action, req.user, tagsIDs);
// Return

MODIFY
src/server/rest/v1/validator/TagValidator.ts
src/server/rest/v1/validator/TagValidator.ts
@@ -56,7 +56,7 @@ export default class TagValidator extends SchemaValidator {
return data;
}
- validateTagsDelete(data: { tagIDs: string[] }): { tagIDs: string[] } {
+ validateTagsDelete(data: { tagsIDs: string[] }): { tagsIDs: string[] } {
this.validate(this.tagsDelete, data);
return data;
}

Fixed delete-many schema