import express from 'express';
const router = express.Router();
import * as authController from './auth.controller.js';
import { authenticate } from '../../common/middleware/auth.js';

// Public routes
router.post('/register', authController.register);
router.post('/login', authController.login);

// Protected routes
router.get('/me', authenticate as any, authController.getProfile);
router.get('/profile', authenticate as any, authController.getProfile);
router.put('/profile', authenticate as any, authController.updateProfile);
router.post('/change-password', authenticate as any, authController.changePassword);

export default router;
