Files
Stackq/.svelte-kit/adapter-node/entries/pages/_page.server.ts.js
T
eewing f6d0c065a4
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m31s
PWA
2026-02-18 11:45:07 -06:00

10 lines
343 B
JavaScript

const COLLECTION = "Stackq_Items";
const load = async ({ locals }) => {
const list = await locals.pb.collection(COLLECTION).getFullList({ sort: "-created", expand: "Parent" }).catch(() => []);
const itemsForParent = list.map((i) => ({ id: i.id, Item: i.Item, SKU: i.SKU }));
return { items: list, itemsForParent };
};
export {
load
};