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
1.5 KiB
Plaintext
1 line
1.5 KiB
Plaintext
{"version":3,"sources":["../../../src/collections/endpoints/docAccess.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 { docAccessOperation } from '../operations/docAccess.js'\n\nexport const docAccessHandler: PayloadHandler = async (req) => {\n const { id, collection } = getRequestCollectionWithID(req, { optionalID: true })\n\n const result = await docAccessOperation({\n id,\n collection,\n data: req.data,\n req,\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","docAccessOperation","docAccessHandler","req","id","collection","optionalID","result","data","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,0BAA0B,QAAQ,sCAAqC;AAChF,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,mBAAmC,OAAOC;IACrD,MAAM,EAAEC,EAAE,EAAEC,UAAU,EAAE,GAAGN,2BAA2BI,KAAK;QAAEG,YAAY;IAAK;IAE9E,MAAMC,SAAS,MAAMN,mBAAmB;QACtCG;QACAC;QACAG,MAAML,IAAIK,IAAI;QACdL;IACF;IAEA,OAAOM,SAASC,IAAI,CAACH,QAAQ;QAC3BI,SAASX,gBAAgB;YACvBW,SAAS,IAAIC;YACbT;QACF;QACAN,QAAQC,WAAWe,EAAE;IACvB;AACF,EAAC"} |