From a4547372c7009eff3fff1b0b71ff5ee040926b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tarik=20Dedi=C4=87?= Date: Sat, 19 Oct 2024 22:29:13 +0200 Subject: [PATCH] Disabling register user role for production as temporary solution --- backend/routes/authRoutes.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/routes/authRoutes.js b/backend/routes/authRoutes.js index 388154b..851f208 100644 --- a/backend/routes/authRoutes.js +++ b/backend/routes/authRoutes.js @@ -2,8 +2,9 @@ const express = require('express'); const { register, login, refreshToken, users } = require('../controllers/authController'); const router = express.Router(); - -router.post('/register', register); +if (process.env.NODE_ENV !== 'production') { + router.post('/register', register); +} router.post('/login', login); router.post('/refresh-token', refreshToken); router.get('/users', users);