refactor: Move saml auth providers endpoint to admin namespace

This commit is contained in:
Faruk AYDIN
2024-02-19 22:18:15 +01:00
parent 6fe9a548ad
commit 679d0808a9
6 changed files with 56 additions and 53 deletions

View File

@@ -1,15 +1,15 @@
import { Router } from 'express';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import { authorizeAdmin } from '../../../helpers/authorization.js';
import { checkIsEnterprise } from '../../../helpers/check-is-enterprise.js';
import getSamlAuthProvidersAction from '../../../controllers/api/v1/saml-auth-providers/get-saml-auth-providers.ee.js';
import getSamlAuthProvidersAction from '../../../controllers/api/v1/admin/saml-auth-providers/get-saml-auth-providers.ee.js';
const router = Router();
router.get(
'/',
authenticateUser,
authorizeUser,
authorizeAdmin,
checkIsEnterprise,
getSamlAuthProvidersAction
);

View File

@@ -15,6 +15,6 @@ router.use('/paddle', paddleRouter);
router.use('/healthcheck', healthcheckRouter);
router.use('/api/v1/automatisch', automatischRouter);
router.use('/api/v1/users', usersRouter);
router.use('/api/v1/saml-auth-providers', samlAuthProvidersRouter);
router.use('/api/v1/admin/saml-auth-providers', samlAuthProvidersRouter);
export default router;