From 98ace2238984c9237a885fbd7a1b936aa47a1126 Mon Sep 17 00:00:00 2001 From: Jonatan Witoszek Date: Fri, 3 Jan 2025 13:41:23 +0100 Subject: [PATCH] Export missing functions, fix errors when handling Web api webhooks --- src/handlers/fetch-api/index.ts | 5 ++--- src/handlers/fetch-api/saleor-webhooks/saleor-webhook.ts | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/handlers/fetch-api/index.ts b/src/handlers/fetch-api/index.ts index 42f05125..3bc2ff5a 100644 --- a/src/handlers/fetch-api/index.ts +++ b/src/handlers/fetch-api/index.ts @@ -2,6 +2,5 @@ export * from "./create-app-register-handler"; export * from "./create-manifest-handler"; export * from "./create-protected-handler"; export * from "./process-protected-handler"; -// export * from "./saleor-webhooks/saleor-async-webhook"; -// export * from "./saleor-webhooks/saleor-sync-webhook"; -// export * from "./saleor-webhooks/sync-webhook-response-builder"; +export * from "./saleor-webhooks/saleor-async-webhook"; +export * from "./saleor-webhooks/saleor-sync-webhook"; diff --git a/src/handlers/fetch-api/saleor-webhooks/saleor-webhook.ts b/src/handlers/fetch-api/saleor-webhooks/saleor-webhook.ts index 1d8e3785..f4f7119d 100644 --- a/src/handlers/fetch-api/saleor-webhooks/saleor-webhook.ts +++ b/src/handlers/fetch-api/saleor-webhooks/saleor-webhook.ts @@ -129,7 +129,7 @@ export abstract class SaleorWebApiWebhook< return async (req) => { debug(`Handler for webhook ${this.name} called`); - await processSaleorWebhook({ + return processSaleorWebhook({ req, apl: this.apl, allowedEvent: this.event,