refactor(webhook): remove singleton webhook logic
This commit is contained in:
@@ -4,7 +4,6 @@ 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();
|
||||
const upload = multer();
|
||||
@@ -39,14 +38,6 @@ function createRouteHandler(path, handler) {
|
||||
.post(wrappedHandler);
|
||||
}
|
||||
|
||||
createRouteHandler(
|
||||
'/connections/:connectionId/:refValue',
|
||||
webhookHandlerByConnectionIdAndRefValue
|
||||
);
|
||||
createRouteHandler(
|
||||
'/connections/:connectionId',
|
||||
webhookHandlerByConnectionIdAndRefValue
|
||||
);
|
||||
createRouteHandler('/flows/:flowId/sync', webhookHandlerSyncByFlowId);
|
||||
createRouteHandler('/flows/:flowId', webhookHandlerByFlowId);
|
||||
createRouteHandler('/:flowId', webhookHandlerByFlowId);
|
||||
|
||||
Reference in New Issue
Block a user