const express = require('express');
const { createRole } = require('../controllers/roleController');
const { getPermissions } = require('../controllers/permissionController');
const { getAllRoles, updateRole } = require('../controllers/roleController');
const router = express.Router();

// Route to create a new role
router.post('/', createRole);

router.get('/', getAllRoles); // Fetch all roles
router.put('/:id', updateRole); // Update role by ID


// Route to fetch all permissions
router.get('/permission', getPermissions);






module.exports = router;
