const express = require('express');
const UserSchedulesController = require('../controllers/user_schedule.controller');
const verifyToken = require("../middleware/verifyToken")
const verifyAccess = require("../middleware/verifyAccess")

const router = express.Router();

router.route("/")
    .get(verifyToken.verifyAccessToken, UserSchedulesController.getAll)
    .post(verifyToken.verifyAccessToken, verifyAccess(), UserSchedulesController.create);

router.route("/:id")
    .get(verifyToken.verifyAccessToken, UserSchedulesController.getById)
    .put(verifyToken.verifyAccessToken, verifyAccess(), UserSchedulesController.update)
    .delete(verifyToken.verifyAccessToken, verifyAccess(), UserSchedulesController.delete);

module.exports = router;