From a1b360a172f6f5038ee282454a757aa97010a54e Mon Sep 17 00:00:00 2001 From: Ali BARIN Date: Mon, 8 Aug 2022 19:44:02 +0200 Subject: [PATCH] fix: make flow.name required with 1 minimum length --- packages/backend/src/models/flow.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/models/flow.ts b/packages/backend/src/models/flow.ts index 458175d6..2cfdb8bc 100644 --- a/packages/backend/src/models/flow.ts +++ b/packages/backend/src/models/flow.ts @@ -16,10 +16,11 @@ class Flow extends Base { static jsonSchema = { type: 'object', + required: ['name'], properties: { id: { type: 'string', format: 'uuid' }, - name: { type: 'string' }, + name: { type: 'string', minLength: 1 }, userId: { type: 'string', format: 'uuid' }, active: { type: 'boolean' }, },