From b9e6a8092a16efe0500480b43004c41305b74588 Mon Sep 17 00:00:00 2001
From: Hanen Alrwasheda <alrwasheda@mi.fu-berlin.de>
Date: Wed, 12 Jan 2022 21:06:49 +0100
Subject: [PATCH] status active nehmen nur boolean

---
 server/src/routes/boatRoutes.routes.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/src/routes/boatRoutes.routes.ts b/server/src/routes/boatRoutes.routes.ts
index e41b8ee..c94ca48 100644
--- a/server/src/routes/boatRoutes.routes.ts
+++ b/server/src/routes/boatRoutes.routes.ts
@@ -26,8 +26,8 @@ boatsRouter.post(
   "/api/boat/",
   body("name").not().isEmpty(),
   body("boattype").not().isEmpty(),
-  body("status").not().isEmpty(),
-  body("active").not().isEmpty(),
+  body("status").not().isEmpty() && body("status").isIn([1,0]),
+  body("active").not().isEmpty() && body("active").isIn([1,0]),
   body("tags").not().isEmpty(),
   handleValidationResult,
   validateToken,
-- 
GitLab