feat: Implement create flow rest API endpoint

This commit is contained in:
Faruk AYDIN
2024-09-02 15:01:20 +03:00
parent b8a25b87d8
commit 79e9455244
6 changed files with 109 additions and 0 deletions

View File

@@ -4,11 +4,13 @@ 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 createFlowAction from '../../../controllers/api/v1/flows/create-flow.js';
const router = Router();
router.get('/', authenticateUser, authorizeUser, getFlowsAction);
router.get('/:flowId', authenticateUser, authorizeUser, getFlowAction);
router.post('/', authenticateUser, authorizeUser, createFlowAction);
router.patch('/:flowId', authenticateUser, authorizeUser, updateFlowAction);
export default router;