const express = require('express');
const PlantSubSectionController = require('../controllers/plant_sub_section.controller');
const verifyToken = require('../middleware/verifyToken');
const verifyAccess = require('../middleware/verifyAccess');

const router = express.Router();

router.route('/')
  .get(verifyToken.verifyAccessToken, PlantSubSectionController.getAll)
  .post(verifyToken.verifyAccessToken, verifyAccess(), PlantSubSectionController.create);

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

module.exports = router;