From bff3d16c9827445b2a2217a560c8e072bdc01aeb Mon Sep 17 00:00:00 2001 From: Patrick Mueller Date: Tue, 11 Jan 2022 17:15:10 +0100 Subject: [PATCH] Hopefully fixing the gym_id stuff --- .../climbing_routes/climbingRoutes.router.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/climbing-route-rating/climbing_routes/climbingRoutes.router.ts b/src/models/climbing-route-rating/climbing_routes/climbingRoutes.router.ts index 25b48e0..9e38339 100644 --- a/src/models/climbing-route-rating/climbing_routes/climbingRoutes.router.ts +++ b/src/models/climbing-route-rating/climbing_routes/climbingRoutes.router.ts @@ -195,7 +195,7 @@ climbingRoutesRouter.get('/:id', async (req: Request, res: Response) => { */ climbingRoutesRouter.post('/', async (req: Request, res: Response) => { try { - let gym_id = Number(req.query.gym_id); + let gym_id = parseInt(req.query.gym_id as string, 10); let name = req.query.name as string; let difficulty = req.query.difficulty as string; let captcha_token = req.query['hcaptcha_response'] as string;