Password updator for users / admin
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
const express = require('express');
|
||||
const authController = require('../controllers/authController');
|
||||
const { requireAuth } = require('../middleware/auth');
|
||||
|
||||
const router = express.Router();
|
||||
|
||||
@@ -12,4 +13,7 @@ router.post('/logout', authController.logout);
|
||||
// GET /api/auth/session
|
||||
router.get('/session', authController.checkSession);
|
||||
|
||||
// POST /api/auth/change-password (requires authentication)
|
||||
router.post('/change-password', requireAuth, authController.changePassword);
|
||||
|
||||
module.exports = router;
|
||||
Reference in New Issue
Block a user