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

const router = express.Router();

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

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

module.exports = router;