Password updator for users / admin

This commit is contained in:
2025-10-15 10:51:08 -06:00
parent 87a58ba862
commit 0ce27eacbb
5 changed files with 436 additions and 0 deletions

View File

@@ -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;