feat: Implement get role API endpoint for admin

This commit is contained in:
Faruk AYDIN
2024-02-21 17:39:05 +01:00
parent 0f24c99456
commit f135a0f09e
4 changed files with 96 additions and 0 deletions

View File

@@ -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;