Files
klz-cables.com/.pnpm-store/v10/files/74/838c5d1399ce618cf5b797a3811acac949c749133117bf606a818b04515a4d84bc4db67f7d5f535f2112c85f453c817f7a7798d9788dc5036393ccaa823969
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
982 B
Plaintext

import{throwIfEmpty as e}from"../../utils/throw-if-empty.js";import{throwIfCoreCollection as t}from"../../utils/throw-core-collection.js";const n=(n,r,i,a)=>()=>{let o={};return e(String(n),`Collection cannot be empty`),t(n,`Cannot use updateItems for core collections`),Array.isArray(r)?(e(r,`keysOrQuery cannot be empty`),o={keys:r}):(e(Object.keys(r),`keysOrQuery cannot be empty`),o={query:r}),o.data=i,{path:`/items/${n}`,params:a??{},body:JSON.stringify(o),method:`PATCH`}},r=(n,r,i)=>()=>(e(String(n),`Collection cannot be empty`),t(n,`Cannot use updateItems for core collections`),{path:`/items/${n}`,params:i??{},body:JSON.stringify(r),method:`PATCH`}),i=(n,r,i,a)=>()=>(e(String(r),`Key cannot be empty`),e(String(n),`Collection cannot be empty`),t(n,`Cannot use updateItem for core collections`),{path:`/items/${n}/${r}`,params:a??{},body:JSON.stringify(i),method:`PATCH`});export{i as updateItem,n as updateItems,r as updateItemsBatch};
//# sourceMappingURL=items.js.map