feat: Implement rest API endpoint to delete flow

This commit is contained in:
Faruk AYDIN
2024-09-14 11:35:17 +03:00
parent 89277e1665
commit bab25c51d9
5 changed files with 164 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ import getFlowAction from '../../../controllers/api/v1/flows/get-flow.js';
import updateFlowAction from '../../../controllers/api/v1/flows/update-flow.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';
const router = Router();
@@ -13,6 +14,7 @@ router.get('/', authenticateUser, authorizeUser, getFlowsAction);
router.get('/:flowId', authenticateUser, authorizeUser, getFlowAction);
router.post('/', authenticateUser, authorizeUser, createFlowAction);
router.patch('/:flowId', authenticateUser, authorizeUser, updateFlowAction);
router.post(
'/:flowId/steps',
authenticateUser,
@@ -20,4 +22,6 @@ router.post(
createStepAction
);
router.delete('/:flowId', authenticateUser, authorizeUser, deleteFlowAction);
export default router;