Files
gameno-api/components/auth/authRoutes.js
T
kavehhn 192c595c68 feat: add password change, class unenroll, and optional notify flags
Let admins skip SMS on user, class, and invoice actions, and let users change their own password with the current one.
2026-08-15 23:48:18 +03:30

16 lines
591 B
JavaScript

// /components/auth/authRoutes.js
const express = require('express');
const authController = require('./authController');
const { validateLogin, validateRefresh } = require('./authValidator');
const authMiddleware = require('../../middlewares/authMiddleware');
const router = express.Router();
router.post('/login', validateLogin, authController.login);
router.post('/refresh', validateRefresh, authController.refresh);
router.post('/logout', authMiddleware, authController.logout);
router.put('/change-password', authMiddleware, authController.changePassword);
module.exports = router;