From cc312876924bd09b5a6a2e9aec0e138d90b471ba Mon Sep 17 00:00:00 2001 From: BradBot_1 Date: Thu, 23 Feb 2023 01:45:41 +0000 Subject: [PATCH] FIX: webhook is already resolved --- src/Server/Webhook.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Server/Webhook.ts b/src/Server/Webhook.ts index c671677..3a84415 100644 --- a/src/Server/Webhook.ts +++ b/src/Server/Webhook.ts @@ -13,14 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -export type WebhookRecievedCallback = (webhookId: string, webhook: Promise) => void; +export type WebhookRecievedCallback = (webhookId: string, webhook: any) => void; export function setupWebhookRoutes(router:any, webhookRecievedCallback:WebhookRecievedCallback):void { router.post('/webhook/:webhook', (req: any, res: any) => { const webhookId = req.params.webhook; console.log("[WEB] Recieved webhook " + webhookId); - webhookRecievedCallback(webhookId, res.body); + webhookRecievedCallback(webhookId, req.body); res.statusCode = 200; res.end(); });