const express = require('express');
const UserController = require('../controllers/UserController');

const router = express.Router();
const userController = new UserController();

// GET /api/users - Összes user lekérése
router.get('/', (req, res) => userController.getAllUsers(req, res));

// GET /api/users/:id - Egy user lekérése ID alapján
router.get('/:id', (req, res) => userController.getUserById(req, res));

// POST /api/users - Új user létrehozása
router.post('/', (req, res) => userController.createUser(req, res));

// PUT /api/users/:id - User frissítése
router.put('/:id', (req, res) => userController.updateUser(req, res));

// DELETE /api/users/:id - User törlése
router.delete('/:id', (req, res) => userController.deleteUser(req, res));

module.exports = router;
