Files
klz-cables.com/.pnpm-store/v10/files/bc/42bf60809c9140e574a4fcbe21c5af9009690cb283d32eb3f05a65a302bf0690dae6c61ffc1cf2cc53af25272a0f7ab2270e5255969bc5cc7438df8d7a69c2
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.1 KiB
Plaintext

{"version":3,"sources":["../../../src/collections/endpoints/findDistinct.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { APIError } from '../../errors/APIError.js'\nimport { getRequestCollection } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { parseParams } from '../../utilities/parseParams/index.js'\nimport { findDistinctOperation } from '../operations/findDistinct.js'\n\nexport const findDistinctHandler: PayloadHandler = async (req) => {\n const collection = getRequestCollection(req)\n\n const { depth, field, limit, page, sort, trash, where } = parseParams(req.query)\n\n if (!field) {\n throw new APIError('field must be specified', httpStatus.BAD_REQUEST)\n }\n\n const result = await findDistinctOperation({\n collection,\n depth,\n field,\n limit,\n page,\n req,\n sort,\n trash,\n where,\n })\n\n return Response.json(result, {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n })\n}\n"],"names":["status","httpStatus","APIError","getRequestCollection","headersWithCors","parseParams","findDistinctOperation","findDistinctHandler","req","collection","depth","field","limit","page","sort","trash","where","query","BAD_REQUEST","result","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,QAAQ,QAAQ,2BAA0B;AACnD,SAASC,oBAAoB,QAAQ,sCAAqC;AAC1E,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,WAAW,QAAQ,uCAAsC;AAClE,SAASC,qBAAqB,QAAQ,gCAA+B;AAErE,OAAO,MAAMC,sBAAsC,OAAOC;IACxD,MAAMC,aAAaN,qBAAqBK;IAExC,MAAM,EAAEE,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAE,GAAGX,YAAYG,IAAIS,KAAK;IAE/E,IAAI,CAACN,OAAO;QACV,MAAM,IAAIT,SAAS,2BAA2BD,WAAWiB,WAAW;IACtE;IAEA,MAAMC,SAAS,MAAMb,sBAAsB;QACzCG;QACAC;QACAC;QACAC;QACAC;QACAL;QACAM;QACAC;QACAC;IACF;IAEA,OAAOI,SAASC,IAAI,CAACF,QAAQ;QAC3BG,SAASlB,gBAAgB;YACvBkB,SAAS,IAAIC;YACbf;QACF;QACAR,QAAQC,WAAWuB,EAAE;IACvB;AACF,EAAC"}