feat: Implement get role API endpoint for admin
This commit is contained in:
@@ -3,6 +3,7 @@ import { authenticateUser } from '../../../../helpers/authentication.js';
|
||||
import { authorizeAdmin } from '../../../../helpers/authorization.js';
|
||||
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
|
||||
import getRolesAction from '../../../../controllers/api/v1/admin/roles/get-roles.ee.js';
|
||||
import getRoleAction from '../../../../controllers/api/v1/admin/roles/get-role.ee.js';
|
||||
|
||||
const router = Router();
|
||||
|
||||
@@ -14,4 +15,12 @@ router.get(
|
||||
getRolesAction
|
||||
);
|
||||
|
||||
router.get(
|
||||
'/:roleId',
|
||||
authenticateUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
getRoleAction
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
Reference in New Issue
Block a user