Skip to content

Commit

Permalink
Create authRoutes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
AKSHITHA-CHILUKA authored Aug 4, 2024
1 parent 61d4381 commit 5a1d079
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions server/routes/authRoutes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const express = require('express');
const router = express.Router();
const authController = require('../controllers/authController');
const validateAuth = require('../middleware/validateAuth');

// Route for user registration
router.post('/register', authController.registerUser);

// Route for user login
router.post('/login', authController.loginUser);

// Route for user logout (if applicable)
router.post('/logout', validateAuth, authController.logoutUser);

// Route for password reset
router.post('/forgot-password', authController.forgotPassword);

// Route for password reset confirmation
router.post('/reset-password/:token', authController.resetPassword);

module.exports = router;

0 comments on commit 5a1d079

Please sign in to comment.