feat: write POST /v1/admin/apps/:key/config

This commit is contained in:
Ali BARIN
2024-08-27 12:44:14 +00:00
parent 87b26b6342
commit af4c1f08ec
4 changed files with 117 additions and 0 deletions

View File

@@ -3,12 +3,22 @@ import asyncHandler from 'express-async-handler';
import { authenticateUser } from '../../../../helpers/authentication.js';
import { authorizeAdmin } from '../../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../../helpers/check-is-enterprise.js';
import createConfigAction from '../../../../controllers/api/v1/admin/apps/create-config.ee.js';
import getAuthClientsAction from '../../../../controllers/api/v1/admin/apps/get-auth-clients.ee.js';
import getAuthClientAction from '../../../../controllers/api/v1/admin/apps/get-auth-client.ee.js';
import createAuthClientAction from '../../../../controllers/api/v1/admin/apps/create-auth-client.ee.js';
const router = Router();
router.post(
'/:appKey/config',
authenticateUser,
authorizeAdmin,
checkIsEnterprise,
asyncHandler(createConfigAction)
);
router.get(
'/:appKey/auth-clients',
authenticateUser,