From a45b419e9cc47f98c2cac5f8f7bf2389de2d2f2a Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 22 Jan 2023 18:14:49 +0100 Subject: [PATCH] Fixed a bug in the key.ts validation --- src/routes/v1/validations/key.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/v1/validations/key.ts b/src/routes/v1/validations/key.ts index d567223..3925e45 100644 --- a/src/routes/v1/validations/key.ts +++ b/src/routes/v1/validations/key.ts @@ -3,5 +3,5 @@ import { IKeyRole } from "@models/AccessKey"; export const keyCreationValidation = Joi.object({ name: Joi.string().min(2).max(15).required(), - role: Joi.number().valid(IKeyRole) + role: Joi.number().valid(IKeyRole.VIEW, IKeyRole.MANAGE, IKeyRole.ADMIN) }); \ No newline at end of file