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

const router = express.Router();

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

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

module.exports = router;