const express = require('express');
const router = express.Router();
const { getUser, register, updateUser, getAll, getProfile } = require('../../controllers/userController');
const authMiddleware = require('../../middleware/authMiddleware');

router.get('/profile', authMiddleware, getProfile);

router.get('/:id', getUser);

router.get('/', getAll);

router.post('/', register);

router.put('/:id', updateUser);

module.exports = router;