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

const router = express.Router();

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

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

module.exports = router;
