aboutsummaryrefslogtreecommitdiffstats
path: root/backend/src/routes/auth.routes.js
diff options
context:
space:
mode:
authorLibravatarLibravatar Biswa Kalyan Bhuyan <[email protected]> 2025-04-29 10:47:43 +0530
committerLibravatarLibravatar Biswa Kalyan Bhuyan <[email protected]> 2025-04-29 10:47:43 +0530
commita2e0a65b2599267efe94d665d6305f59b225bbd5 (patch)
treee2cef2031e3f7655e0c5f419020a3f1064c3b7b8 /backend/src/routes/auth.routes.js
parent570bf0f3f065d583d6f94ecfc61aae93ba3e43de (diff)
downloadrestaurant-a2e0a65b2599267efe94d665d6305f59b225bbd5.tar.gz
restaurant-a2e0a65b2599267efe94d665d6305f59b225bbd5.tar.bz2
restaurant-a2e0a65b2599267efe94d665d6305f59b225bbd5.zip
feat: added initlaized the frontend and backendHEADmaster
Diffstat (limited to 'backend/src/routes/auth.routes.js')
-rw-r--r--backend/src/routes/auth.routes.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/backend/src/routes/auth.routes.js b/backend/src/routes/auth.routes.js
new file mode 100644
index 0000000..d01423c
--- /dev/null
+++ b/backend/src/routes/auth.routes.js
@@ -0,0 +1,14 @@
+const express = require('express');
+const { register, login, getProfile } = require('../controllers/auth.controller');
+const { authenticate } = require('../middleware/auth.middleware');
+
+const router = express.Router();
+
+// Public routes
+router.post('/register', register);
+router.post('/login', login);
+
+// Protected routes
+router.get('/profile', authenticate, getProfile);
+
+module.exports = router; \ No newline at end of file