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
1 line
2.1 KiB
Plaintext
1 line
2.1 KiB
Plaintext
{"version":3,"sources":["../../../src/collections/endpoints/findByID.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 { findByIDOperation } from '../operations/findByID.js'\n\nexport const findByIDHandler: PayloadHandler = async (req) => {\n const { data: dataArg } = req\n const { id, collection } = getRequestCollectionWithID(req)\n\n const { data, depth, draft, flattenLocales, joins, populate, select, trash } = parseParams({\n ...req.query,\n ...dataArg,\n })\n\n const result = await findByIDOperation({\n id,\n collection,\n data,\n depth,\n draft,\n flattenLocales,\n joins,\n populate,\n req,\n select,\n trash,\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","getRequestCollectionWithID","headersWithCors","parseParams","findByIDOperation","findByIDHandler","req","data","dataArg","id","collection","depth","draft","flattenLocales","joins","populate","select","trash","query","result","Response","json","headers","Headers","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,iBAAiB,QAAQ,4BAA2B;AAE7D,OAAO,MAAMC,kBAAkC,OAAOC;IACpD,MAAM,EAAEC,MAAMC,OAAO,EAAE,GAAGF;IAC1B,MAAM,EAAEG,EAAE,EAAEC,UAAU,EAAE,GAAGT,2BAA2BK;IAEtD,MAAM,EAAEC,IAAI,EAAEI,KAAK,EAAEC,KAAK,EAAEC,cAAc,EAAEC,KAAK,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGd,YAAY;QACzF,GAAGG,IAAIY,KAAK;QACZ,GAAGV,OAAO;IACZ;IAEA,MAAMW,SAAS,MAAMf,kBAAkB;QACrCK;QACAC;QACAH;QACAI;QACAC;QACAC;QACAC;QACAC;QACAT;QACAU;QACAC;IACF;IAEA,OAAOG,SAASC,IAAI,CAACF,QAAQ;QAC3BG,SAASpB,gBAAgB;YACvBoB,SAAS,IAAIC;YACbjB;QACF;QACAP,QAAQC,WAAWwB,EAAE;IACvB;AACF,EAAC"} |