feat(webhook/catch-raw-webhook): add sync support

This commit is contained in:
Ali BARIN
2024-02-23 16:19:26 +00:00
parent f6b2312c49
commit 7484bf7403
5 changed files with 137 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import multer from 'multer';
import appConfig from '../config/app.js';
import webhookHandlerByFlowId from '../controllers/webhooks/handler-by-flow-id.js';
import webhookHandlerSyncByFlowId from '../controllers/webhooks/handler-sync-by-flow-id.js';
import webhookHandlerByConnectionIdAndRefValue from '../controllers/webhooks/handler-by-connection-id-and-ref-value.js';
const router = Router();
@@ -46,6 +47,7 @@ createRouteHandler(
'/connections/:connectionId',
webhookHandlerByConnectionIdAndRefValue
);
createRouteHandler('/flows/:flowId/sync', webhookHandlerSyncByFlowId);
createRouteHandler('/flows/:flowId', webhookHandlerByFlowId);
createRouteHandler('/:flowId', webhookHandlerByFlowId);