Files
klz-cables.com/.pnpm-store/v10/files/1b/92e8cae61d971e2bcc35a04358ae8396870f30031e46eabb6b3ff7e87f5adfef755f8bfefd184be308c2b729e6dec20553683e78f73e4d6a511ad90a5d7ae7
Marc Mintel 5397309103
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
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

2 lines
904 B
Plaintext

const e=require(`../utils/get-request-url.cjs`),t=require(`../utils/request.cjs`),n={},r=(r={})=>i=>{let a={...n,...r};return{async request(n){let o=n();if(o.headers||={},`Content-Type`in o.headers?o.headers[`Content-Type`]===`multipart/form-data`&&delete o.headers[`Content-Type`]:o.headers[`Content-Type`]=`application/json`,`getToken`in this&&!(`Authorization`in o.headers)){let e=await this.getToken();e&&(o.headers.Authorization=`Bearer ${e}`)}let s=e.getRequestUrl(i.url,o.path,o.params),c={method:o.method??`GET`,headers:o.headers??{}};`credentials`in a&&(c.credentials=a.credentials),o.body&&(c.body=o.body),o.onRequest&&(c=await o.onRequest(c)),a.onRequest&&(c=await a.onRequest(c));let l=await t.request(s.toString(),c,i.globals.fetch);return`onResponse`in o&&(l=await o.onResponse(l,c)),`onResponse`in r&&(l=await r.onResponse(l,c)),l}}};exports.rest=r;
//# sourceMappingURL=composable.cjs.map