const express = require('express');
const router = express.Router();
const AuthController = require('../controllers/auth.controller');
const { authenticateToken } = require('../middleware/auth');

// Public routes
router.post('/login', AuthController.login);
router.post('/logout', AuthController.logout);

// Protected routes
router.get('/me', authenticateToken, AuthController.getCurrentUser);
router.post('/change-password', authenticateToken, AuthController.changePassword);
router.put('/notifications', authenticateToken, AuthController.updateNotifications);
router.put('/staff-notifications', authenticateToken, AuthController.updateStaffNotifications);

module.exports = router;
