const express = require('express');
const adminControllers = require('../../controllers/superadmin/AdminController.js');
const verifyJWT = require('../../middleware/VerifyJWT.js');
const checkRole = require('../../middleware/CheckRole.js');

const router = express.Router();

router.post('/', verifyJWT, checkRole(['superadmin']), adminControllers.storeAdmin);
router.get('/', verifyJWT, checkRole(['superadmin']), adminControllers.getAllAdmin);
router.get('/:id', verifyJWT, checkRole(['superadmin']), adminControllers.showAdmin);
router.patch('/:id', verifyJWT, checkRole(['superadmin']), adminControllers.updateAdmin);
router.delete('/:id', verifyJWT, checkRole(['superadmin']), adminControllers.deleteAdmin);

module.exports = router;