refactor(installation): improve allow installation guard

This commit is contained in:
Ali BARIN
2024-05-13 14:00:12 +00:00
parent b30f97db3e
commit c80791267f
5 changed files with 44 additions and 12 deletions

View File

@@ -1,13 +1,13 @@
import { Router } from 'express';
import asyncHandler from 'express-async-handler';
import { authorizeInstallation } from '../../../../helpers/authorize-installation.js';
import { allowInstallation } from '../../../../helpers/allow-installation.js';
import createUserAction from '../../../../controllers/api/v1/installation/users/create-user.js';
const router = Router();
router.post(
'/',
authorizeInstallation,
allowInstallation,
asyncHandler(createUserAction)
);