diff --git a/src/components/TableModals/WebhooksModal/Schemas/basic.tsx b/src/components/TableModals/WebhooksModal/Schemas/basic.tsx index 1ee073db..1a849b20 100644 --- a/src/components/TableModals/WebhooksModal/Schemas/basic.tsx +++ b/src/components/TableModals/WebhooksModal/Schemas/basic.tsx @@ -65,8 +65,8 @@ export const webhookBasic = { // WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY logging.log("basicParser started") - // Import any NPM package needed - // const lodash = require('lodash'); + // Import NPM package needed, some packages may not work in Webhooks + // const {default: lodash} = await import("lodash"); // Optionally return an object to be added as a new row to the table // Example: add the webhook body as row diff --git a/src/components/TableModals/WebhooksModal/Schemas/sendgrid.tsx b/src/components/TableModals/WebhooksModal/Schemas/sendgrid.tsx index e23bef18..b1f7def1 100644 --- a/src/components/TableModals/WebhooksModal/Schemas/sendgrid.tsx +++ b/src/components/TableModals/WebhooksModal/Schemas/sendgrid.tsx @@ -14,8 +14,8 @@ export const webhookSendgrid = { // WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY logging.log("sendgridParser started") - // Import any NPM package needed - // const lodash = require('lodash'); + // Import NPM package needed, some packages may not work in Webhooks + // const {default: lodash} = await import("lodash"); const { body } = req const eventHandler = async (sgEvent) => { diff --git a/src/components/TableModals/WebhooksModal/Schemas/stripe.tsx b/src/components/TableModals/WebhooksModal/Schemas/stripe.tsx index 9c34383f..21d0deb7 100644 --- a/src/components/TableModals/WebhooksModal/Schemas/stripe.tsx +++ b/src/components/TableModals/WebhooksModal/Schemas/stripe.tsx @@ -25,8 +25,8 @@ export const webhookStripe = { // WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY logging.log("stripeParser started") - // Import any NPM package needed - // const lodash = require('lodash'); + // Import NPM package needed, some packages may not work in Webhooks + // const {default: lodash} = await import("lodash"); const event = req.body switch (event.type) { diff --git a/src/components/TableModals/WebhooksModal/Schemas/typeform.tsx b/src/components/TableModals/WebhooksModal/Schemas/typeform.tsx index 18c60569..b6f7b4ce 100644 --- a/src/components/TableModals/WebhooksModal/Schemas/typeform.tsx +++ b/src/components/TableModals/WebhooksModal/Schemas/typeform.tsx @@ -14,8 +14,8 @@ export const webhookTypeform = { // WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY logging.log("typeformParser started") - // Import any NPM package needed - // const lodash = require('lodash'); + // Import NPM package needed, some packages may not work in Webhooks + // const {default: lodash} = await import("lodash"); // This reduces the form submission into a single object of key value pairs // Example: {name: "John", age: 20} diff --git a/src/components/TableModals/WebhooksModal/Schemas/webform.tsx b/src/components/TableModals/WebhooksModal/Schemas/webform.tsx index 848bad07..9e1dc3c5 100644 --- a/src/components/TableModals/WebhooksModal/Schemas/webform.tsx +++ b/src/components/TableModals/WebhooksModal/Schemas/webform.tsx @@ -15,8 +15,8 @@ export const webhook = { // WRITE YOUR CODE ONLY BELOW THIS LINE. DO NOT WRITE CODE/COMMENTS OUTSIDE THE FUNCTION BODY logging.log("formParser started") - // Import any NPM package needed - // const lodash = require('lodash'); + // Import NPM package needed, some packages may not work in Webhooks + // const {default: lodash} = await import("lodash"); // Optionally return an object to be added as a new row to the table // Example: add the webhook body as row