Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
1 line
1.2 KiB
Plaintext
1 line
1.2 KiB
Plaintext
{"version":3,"sources":["../../src/utilities/wrapInternalEndpoints.ts"],"sourcesContent":["import type { Endpoint } from '../config/types.js'\n\nimport { addDataAndFileToRequest } from './addDataAndFileToRequest.js'\nimport { addLocalesToRequestFromData } from './addLocalesToRequest.js'\n\nexport const wrapInternalEndpoints = (endpoints: Endpoint[]): Endpoint[] => {\n return endpoints.map((endpoint) => {\n const handler = endpoint.handler\n\n if (['patch', 'post'].includes(endpoint.method)) {\n endpoint.handler = async (req) => {\n await addDataAndFileToRequest(req)\n addLocalesToRequestFromData(req)\n return handler(req)\n }\n }\n\n return endpoint\n })\n}\n"],"names":["addDataAndFileToRequest","addLocalesToRequestFromData","wrapInternalEndpoints","endpoints","map","endpoint","handler","includes","method","req"],"mappings":"AAEA,SAASA,uBAAuB,QAAQ,+BAA8B;AACtE,SAASC,2BAA2B,QAAQ,2BAA0B;AAEtE,OAAO,MAAMC,wBAAwB,CAACC;IACpC,OAAOA,UAAUC,GAAG,CAAC,CAACC;QACpB,MAAMC,UAAUD,SAASC,OAAO;QAEhC,IAAI;YAAC;YAAS;SAAO,CAACC,QAAQ,CAACF,SAASG,MAAM,GAAG;YAC/CH,SAASC,OAAO,GAAG,OAAOG;gBACxB,MAAMT,wBAAwBS;gBAC9BR,4BAA4BQ;gBAC5B,OAAOH,QAAQG;YACjB;QACF;QAEA,OAAOJ;IACT;AACF,EAAC"} |