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

const router = express.Router();

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

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

module.exports = router;