const express = require('express')
const router = express.Router()
const provinceController = require('../../controllers/admin/ProvinceController.js')
const verifyJWT = require('../../middleware/VerifyJWT.js');
const checkRole = require('../../middleware/CheckRole.js');

// router.get('/', verifyJWT, checkRole(['admin', 'sales']), provinceController.getAllProvince);
// router.post('/', verifyJWT, checkRole(['admin']), provinceController.storeProvince);
// router.get('/:id', verifyJWT, checkRole(['admin']), provinceController.showProvince);
// router.patch('/:id', verifyJWT, checkRole(['admin']), provinceController.updateProvince);
// router.delete('/:id', verifyJWT, checkRole(['admin']), provinceController.deleteProvince);

router.get('/', verifyJWT, checkRole(['admin']), provinceController.getAllProvince);
router.post('/', verifyJWT, checkRole(['admin']), provinceController.storeProvince);
router.get('/:id', verifyJWT, checkRole(['admin']), provinceController.showProvince);
router.patch('/:id', verifyJWT, checkRole(['admin']), provinceController.updateProvince);
router.delete('/:id', verifyJWT, checkRole(['admin']), provinceController.deleteProvince);

module.exports = router;