{"version":3,"sources":["../../../src/globals/endpoints/docAccess.ts"],"sourcesContent":["import { status as httpStatus } from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\n\nimport { getRequestGlobal } 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 globalConfig = getRequestGlobal(req)\n const result = await docAccessOperation({\n data: req.data,\n globalConfig,\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","getRequestGlobal","headersWithCors","docAccessOperation","docAccessHandler","req","globalConfig","result","data","Response","json","headers","Headers","OK"],"mappings":"AAAA,SAASA,UAAUC,UAAU,QAAQ,cAAa;AAIlD,SAASC,gBAAgB,QAAQ,sCAAqC;AACtE,SAASC,eAAe,QAAQ,qCAAoC;AACpE,SAASC,kBAAkB,QAAQ,6BAA4B;AAE/D,OAAO,MAAMC,mBAAmC,OAAOC;IACrD,MAAMC,eAAeL,iBAAiBI;IACtC,MAAME,SAAS,MAAMJ,mBAAmB;QACtCK,MAAMH,IAAIG,IAAI;QACdF;QACAD;IACF;IAEA,OAAOI,SAASC,IAAI,CAACH,QAAQ;QAC3BI,SAAST,gBAAgB;YACvBS,SAAS,IAAIC;YACbP;QACF;QACAN,QAAQC,WAAWa,EAAE;IACvB;AACF,EAAC"}