Files
klz-cables.com/.pnpm-store/v10/files/37/3a8b1656fa62e12d3d10593a66655c2ab5040a85e9a2d86fe10f586b69d491824b2596fb3ce4b66e042e0e1bd5b6bacde511f4624d7f02e01c182171539a84
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
914 B
Plaintext

import{getRequestUrl as e}from"../utils/get-request-url.js";import{request as t}from"../utils/request.js";const 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(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(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}}};export{r as rest};
//# sourceMappingURL=composable.js.map