feat: Implement update flow status rest API endpoint

This commit is contained in:
Faruk AYDIN
2024-09-17 16:07:12 +03:00
parent 712a5756e2
commit 1790ef0ee6
7 changed files with 350 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import { authorizeUser } from '../../../helpers/authorization.js';
import getFlowsAction from '../../../controllers/api/v1/flows/get-flows.js';
import getFlowAction from '../../../controllers/api/v1/flows/get-flow.js';
import updateFlowAction from '../../../controllers/api/v1/flows/update-flow.js';
import updateFlowStatusAction from '../../../controllers/api/v1/flows/update-flow-status.js';
import createFlowAction from '../../../controllers/api/v1/flows/create-flow.js';
import createStepAction from '../../../controllers/api/v1/flows/create-step.js';
import deleteFlowAction from '../../../controllers/api/v1/flows/delete-flow.js';
@@ -16,12 +17,20 @@ router.get('/:flowId', authenticateUser, authorizeUser, getFlowAction);
router.post('/', authenticateUser, authorizeUser, createFlowAction);
router.patch('/:flowId', authenticateUser, authorizeUser, updateFlowAction);
router.patch(
'/:flowId/status',
authenticateUser,
authorizeUser,
updateFlowStatusAction
);
router.post(
'/:flowId/steps',
authenticateUser,
authorizeUser,
createStepAction
);
router.post(
'/:flowId/duplicate',
authenticateUser,