@shopify/shopify-app-express
Version:
Shopify Express Middleware - to simplify the building of Shopify Apps with Express
1 lines • 1.05 kB
Source Map (JSON)
{"version":3,"file":"process.mjs","sources":["../../../../src/webhooks/process.ts"],"sourcesContent":["import {WebhookProcessParams} from './types';\n\nexport async function process({\n req,\n res,\n api,\n config,\n}: WebhookProcessParams): Promise<void> {\n try {\n await api.webhooks.process({\n rawBody: req.body,\n rawRequest: req,\n rawResponse: res,\n });\n\n config.logger.info('Webhook processed, returned status code 200');\n } catch (error) {\n config.logger.error(`Failed to process webhook: ${error}`);\n\n // The library will respond even if the handler throws an error\n }\n}\n"],"names":[],"mappings":"AAEO,eAAe,OAAO,CAAC,EAC5B,GAAG,EACH,GAAG,EACH,GAAG,EACH,MAAM,GACe,EAAA;AACrB,IAAA,IAAI;AACF,QAAA,MAAM,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;YACzB,OAAO,EAAE,GAAG,CAAC,IAAI;AACjB,YAAA,UAAU,EAAE,GAAG;AACf,YAAA,WAAW,EAAE,GAAG;AACjB,SAAA,CAAC;AAEF,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,6CAA6C,CAAC;IACnE;IAAE,OAAO,KAAK,EAAE;QACd,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,2BAAA,EAA8B,KAAK,CAAA,CAAE,CAAC;;IAG5D;AACF;;;;"}