import express from 'express';

/**
 * Auth Routes
 * 
 * FELADAT: Implementáld az auth middleware-t és védett route-okat!
 */
export function createAuthRoutes(authController) {
  const router = express.Router();

  // Publikus route-ok
  router.post('/register', (req, res) => authController.register(req, res));
  router.post('/login', (req, res) => authController.login(req, res));
  router.post('/refresh', (req, res) => authController.refreshToken(req, res));

  // Védett route-ok - FELADAT: add hozzá az auth middleware-t!
  router.post('/logout', (req, res) => authController.logout(req, res));
  router.get('/me', (req, res) => authController.getCurrentUser(req, res));

  return router;
}
