Files
klz-cables.com/.pnpm-store/v10/files/b7/8bb2af167831426deef3f41fb225b48519edf1b00e25befcf1377b6fadd194215944d0b340d7349c0a2a0abd497adfc55a7774271d3bc4d7d869b378a5cc08
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/globals/endpoints/restoreVersion.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { restoreVersionOperationGlobal, sanitizePopulateParam } from '../../index.js'\nimport { getRequestGlobal } from '../../utilities/getRequestEntity.js'\nimport { headersWithCors } from '../../utilities/headersWithCors.js'\nimport { isNumber } from '../../utilities/isNumber.js'\n\nexport const restoreVersionHandler: PayloadHandler = async (req) => {\n const globalConfig = getRequestGlobal(req)\n const { searchParams } = req\n const depth = searchParams.get('depth')\n const draft = searchParams.get('draft')\n\n const doc = await restoreVersionOperationGlobal({\n id: req.routeParams!.id as string,\n depth: isNumber(depth) ? Number(depth) : undefined,\n draft: draft === 'true' ? true : undefined,\n globalConfig,\n populate: sanitizePopulateParam(req.query.populate),\n req,\n })\n\n return Response.json(\n {\n doc,\n message: req.t('version:restoredSuccessfully'),\n },\n {\n headers: headersWithCors({\n headers: new Headers(),\n req,\n }),\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["status","httpStatus","restoreVersionOperationGlobal","sanitizePopulateParam","getRequestGlobal","headersWithCors","isNumber","restoreVersionHandler","req","globalConfig","searchParams","depth","get","draft","doc","id","routeParams","Number","undefined","populate","query","Response","json","message","t","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,6BAA6B,EAAEC,qBAAqB,QAAQ,iBAAgB;AACrF,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,QAAQ,QAAQ,8BAA6B;AAEtD,OAAO,MAAMC,wBAAwC,OAAOC;IAC1D,MAAMC,eAAeL,iBAAiBI;IACtC,MAAM,EAAEE,YAAY,EAAE,GAAGF;IACzB,MAAMG,QAAQD,aAAaE,GAAG,CAAC;IAC/B,MAAMC,QAAQH,aAAaE,GAAG,CAAC;IAE/B,MAAME,MAAM,MAAMZ,8BAA8B;QAC9Ca,IAAIP,IAAIQ,WAAW,CAAED,EAAE;QACvBJ,OAAOL,SAASK,SAASM,OAAON,SAASO;QACzCL,OAAOA,UAAU,SAAS,OAAOK;QACjCT;QACAU,UAAUhB,sBAAsBK,IAAIY,KAAK,CAACD,QAAQ;QAClDX;IACF;IAEA,OAAOa,SAASC,IAAI,CAClB;QACER;QACAS,SAASf,IAAIgB,CAAC,CAAC;IACjB,GACA;QACEC,SAASpB,gBAAgB;YACvBoB,SAAS,IAAIC;YACblB;QACF;QACAR,QAAQC,WAAW0B,EAAE;IACvB;AAEJ,EAAC"}