aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/funds/+page.server.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
committerAdam Soltys <[email protected]>2026-03-04 09:23:03 -0800
commitba579c4f801be258128294e7cb1f4d2e518e37ca (patch)
tree2ffbee38d5d82d06580a68ffddd798c1930d6ded /src/routes/(app)/funds/+page.server.ts
parente39b182ac4c2134157eca3f4cc7c8c7dfd389484 (diff)
downloadcoinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.tar.gz
coinos-ui-ba579c4f801be258128294e7cb1f4d2e518e37ca.zip
fix api calls
Diffstat (limited to 'src/routes/(app)/funds/+page.server.ts')
-rw-r--r--src/routes/(app)/funds/+page.server.ts10
1 files changed, 10 insertions, 0 deletions
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 };
+};