feat: Move get user API endpoint to admin namespace

This commit is contained in:
Faruk AYDIN
2024-02-24 00:40:45 +01:00
parent 532cfc10d0
commit ca7636e7bc
6 changed files with 46 additions and 41 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 getUsersAction from '../../../../controllers/api/v1/admin/users/get-users.ee.js';
import getUserAction from '../../../../controllers/api/v1/admin/users/get-user.ee.js';
const router = Router();
@@ -14,4 +15,12 @@ router.get(
getUsersAction
);
router.get(
'/:userId',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
getUserAction
);
export default router;