From ba579c4f801be258128294e7cb1f4d2e518e37ca Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Mar 2026 09:23:03 -0800 Subject: fix api calls --- src/routes/(app)/funds/+page.server.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/routes/(app)/funds/+page.server.ts (limited to 'src/routes/(app)/funds/+page.server.ts') diff --git a/src/routes/(app)/funds/+page.server.ts b/src/routes/(app)/funds/+page.server.ts new file mode 100644 index 00000000..e6836596 --- /dev/null +++ b/src/routes/(app)/funds/+page.server.ts @@ -0,0 +1,10 @@ +import getRates from "$lib/rates"; +import { auth, get } from "$lib/utils"; + +export const load = async ({ cookies, parent }) => { + const { user } = await parent(); + const funds = await get("/funds", auth(cookies)); + const rates = await getRates(); + const rate = rates[user?.currency || "USD"]; + return { funds, rate }; +}; -- cgit v1.2.3