Files
klz-cables.com/.pnpm-store/v10/files/f6/4604b7a081efc2436c9dc1d0eb86435cf4e02bc3a89f657a9ccd54394ea5a026eb56fd8207b0ef70d949ca2c9d98e2711ab94726cd3637d2124162e00eed5d
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

1 line
2.3 KiB
Plaintext

{"version":3,"sources":["../../../src/collections/endpoints/deleteByID.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { parseParams } from '../../utilities/parseParams/index.js'\nimport { deleteByIDOperation } from '../operations/deleteByID.js'\n\nexport const deleteByIDHandler: PayloadHandler = async (req) => {\n const { id, collection } = getRequestCollectionWithID(req)\n\n const { depth, overrideLock, populate, select, trash } = parseParams(req.query)\n\n const doc = await deleteByIDOperation({\n id,\n collection,\n depth,\n overrideLock: overrideLock ?? false,\n populate,\n req,\n select,\n trash,\n })\n\n const headers = headersWithCors({\n headers: new Headers(),\n req,\n })\n\n if (!doc) {\n return Response.json(\n {\n message: req.t('general:notFound'),\n },\n {\n headers,\n status: httpStatus.NOT_FOUND,\n },\n )\n }\n\n return Response.json(\n {\n doc,\n message: req.t('general:deletedSuccessfully'),\n },\n {\n headers,\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["status","httpStatus","getRequestCollectionWithID","headersWithCors","parseParams","deleteByIDOperation","deleteByIDHandler","req","id","collection","depth","overrideLock","populate","select","trash","query","doc","headers","Headers","Response","json","message","t","NOT_FOUND","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,0BAA0B,QAAQ,sCAAqC;AAChF,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,mBAAmB,QAAQ,8BAA6B;AAEjE,OAAO,MAAMC,oBAAoC,OAAOC;IACtD,MAAM,EAAEC,EAAE,EAAEC,UAAU,EAAE,GAAGP,2BAA2BK;IAEtD,MAAM,EAAEG,KAAK,EAAEC,YAAY,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGV,YAAYG,IAAIQ,KAAK;IAE9E,MAAMC,MAAM,MAAMX,oBAAoB;QACpCG;QACAC;QACAC;QACAC,cAAcA,gBAAgB;QAC9BC;QACAL;QACAM;QACAC;IACF;IAEA,MAAMG,UAAUd,gBAAgB;QAC9Bc,SAAS,IAAIC;QACbX;IACF;IAEA,IAAI,CAACS,KAAK;QACR,OAAOG,SAASC,IAAI,CAClB;YACEC,SAASd,IAAIe,CAAC,CAAC;QACjB,GACA;YACEL;YACAjB,QAAQC,WAAWsB,SAAS;QAC9B;IAEJ;IAEA,OAAOJ,SAASC,IAAI,CAClB;QACEJ;QACAK,SAASd,IAAIe,CAAC,CAAC;IACjB,GACA;QACEL;QACAjB,QAAQC,WAAWuB,EAAE;IACvB;AAEJ,EAAC"}