Files
klz-cables.com/.pnpm-store/v10/files/df/59f213cd728c606cb0b6ea76d4f84a51fea882834ea0e269c8c8339c5e820c9cdb43e953152aff3b9c81955155f79931f32acc354f8d288c42e95731b2198a
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

35 lines
1.0 KiB
Plaintext

import { status as httpStatus } from 'http-status';
import { getRequestCollectionWithID } from '../../utilities/getRequestEntity.js';
import { headersWithCors } from '../../utilities/headersWithCors.js';
import { parseParams } from '../../utilities/parseParams/index.js';
import { findByIDOperation } from '../operations/findByID.js';
export const findByIDHandler = async (req)=>{
const { data: dataArg } = req;
const { id, collection } = getRequestCollectionWithID(req);
const { data, depth, draft, flattenLocales, joins, populate, select, trash } = parseParams({
...req.query,
...dataArg
});
const result = await findByIDOperation({
id,
collection,
data,
depth,
draft,
flattenLocales,
joins,
populate,
req,
select,
trash
});
return Response.json(result, {
headers: headersWithCors({
headers: new Headers(),
req
}),
status: httpStatus.OK
});
};
//# sourceMappingURL=findByID.js.map