const { Router } = require('express');
const { register, login, profile } = require('../controllers/authController');
const { registerValidator, loginValidator } = require('../validators/authValidators');
const authMiddleware = require('../middleware/auth');

const router = Router();

router.post('/register', registerValidator, register);
router.post('/login', loginValidator, login);
router.get('/profile', authMiddleware, profile);

module.exports = router;
