From 2aba37e60c5a76d749a66bd62e94f2d2aa630b8a Mon Sep 17 00:00:00 2001 From: Ulf Gebhardt Date: Fri, 19 Nov 2021 01:00:55 +0100 Subject: [PATCH] replace map with foreach since we don't need a return - thanks moriz --- backend/src/webhook/elopage.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backend/src/webhook/elopage.ts b/backend/src/webhook/elopage.ts index 945a2a24c..10dc35b61 100644 --- a/backend/src/webhook/elopage.ts +++ b/backend/src/webhook/elopage.ts @@ -37,7 +37,7 @@ export const elopageWebhook = async (req: any, res: any): Promise => { let firstName = '' let lastName = '' const entries = req.body.split('&') - entries.map((entry: string) => { + entries.foreach((entry: string) => { const keyVal = entry.split('=') if (keyVal.length !== 2) { throw new Error(`Error parsing entry '${entry}'`) @@ -90,7 +90,6 @@ export const elopageWebhook = async (req: any, res: any): Promise => { // eslint-disable-next-line no-console console.log(`Unknown Elopage Value '${entry}'`) } - return null // we write things into the loginElopgaeBuy object, no return value needed }) // Do not process certain events