const express = require('express');
const router = express.Router();
const { getProfile, updateProfile } = require('../controllers/userController');
const { protect } = require('../middleware/auth');
const validateRequest = require('../middleware/validate');
const userSchemas = require('../validation/userSchema');

router.use(protect);
router.get('/profile', getProfile);
router.put('/profile', validateRequest(userSchemas.update), updateProfile);

module.exports = router;