From 38242abbbe1ce4996c03f3801f5aaf86031a6cb4 Mon Sep 17 00:00:00 2001 From: Sergei Samokhvalov Date: Fri, 29 Dec 2023 12:48:34 +0300 Subject: [PATCH] Fix validation for parentId and collectionId (#52) --- src/services/new/collection/move-collections-list.ts | 2 +- src/services/new/workbook/move-workbooks-list.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/new/collection/move-collections-list.ts b/src/services/new/collection/move-collections-list.ts index 72f1e39c..ab53e59c 100644 --- a/src/services/new/collection/move-collections-list.ts +++ b/src/services/new/collection/move-collections-list.ts @@ -23,7 +23,7 @@ const validateArgs = makeSchemaValidator({ items: {type: 'string'}, }, parentId: { - type: 'string', + type: ['string', 'null'], }, }, }); diff --git a/src/services/new/workbook/move-workbooks-list.ts b/src/services/new/workbook/move-workbooks-list.ts index 9b9474b9..1e5c73b0 100644 --- a/src/services/new/workbook/move-workbooks-list.ts +++ b/src/services/new/workbook/move-workbooks-list.ts @@ -23,7 +23,7 @@ const validateArgs = makeSchemaValidator({ items: {type: 'string'}, }, collectionId: { - type: 'string', + type: ['string', 'null'], }, }, });