feat: Implement API endpoint to get flows of the specified app

This commit is contained in:
Faruk AYDIN
2024-03-09 15:09:12 +01:00
parent 251d1b5b2e
commit 22ce29e86c
4 changed files with 165 additions and 0 deletions

View File

@@ -1,6 +1,7 @@
import { Router } from 'express';
import asyncHandler from 'express-async-handler';
import { authenticateUser } from '../../../helpers/authentication.js';
import { authorizeUser } from '../../../helpers/authorization.js';
import getAppAction from '../../../controllers/api/v1/apps/get-app.js';
import getAppsAction from '../../../controllers/api/v1/apps/get-apps.js';
import getAuthAction from '../../../controllers/api/v1/apps/get-auth.js';
@@ -8,6 +9,7 @@ import getTriggersAction from '../../../controllers/api/v1/apps/get-triggers.js'
import getTriggerSubstepsAction from '../../../controllers/api/v1/apps/get-trigger-substeps.js';
import getActionsAction from '../../../controllers/api/v1/apps/get-actions.js';
import getActionSubstepsAction from '../../../controllers/api/v1/apps/get-action-substeps.js';
import getFlowsAction from '../../../controllers/api/v1/apps/get-flows.js';
const router = Router();
@@ -39,4 +41,11 @@ router.get(
asyncHandler(getActionSubstepsAction)
);
router.get(
'/:appKey/flows',
authenticateUser,
authorizeUser,
asyncHandler(getFlowsAction)
);
export default router;