Files
Stackq/.svelte-kit/output/server/entries/pages/_page.server.ts.js
T

10 lines
330 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 { itemsForParent };
};
export {
load
};