feat: Implement async handler for routes
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { Router } from 'express';
|
||||
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';
|
||||
@@ -12,7 +13,7 @@ router.get(
|
||||
authenticateUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
getSamlAuthProvidersAction
|
||||
asyncHandler(getSamlAuthProvidersAction)
|
||||
);
|
||||
|
||||
router.get(
|
||||
@@ -20,7 +21,7 @@ router.get(
|
||||
authenticateUser,
|
||||
authorizeAdmin,
|
||||
checkIsEnterprise,
|
||||
getSamlAuthProviderAction
|
||||
asyncHandler(getSamlAuthProviderAction)
|
||||
);
|
||||
|
||||
export default router;
|
||||
|
Reference in New Issue
Block a user