diff options
| author | Adam Soltys <[email protected]> | 2024-12-05 19:20:36 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-12-05 19:20:36 -0800 |
| commit | 53aecbf35d056fc4d70ef1ab12d3634b265f2c0b (patch) | |
| tree | 5caa996fc2eca705fb793e79d63bfbf5f9f93e48 /src/routes/(app)/ecash | |
| parent | 9c7ade85841e4e608fd9d8468d19b42b79cd9868 (diff) | |
| download | coinos-ui-53aecbf35d056fc4d70ef1ab12d3634b265f2c0b.tar.gz coinos-ui-53aecbf35d056fc4d70ef1ab12d3634b265f2c0b.zip | |
cached rates
Diffstat (limited to 'src/routes/(app)/ecash')
| -rw-r--r-- | src/routes/(app)/ecash/[id]/[...version]/+page.server.ts | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/routes/(app)/ecash/[id]/[...version]/+page.server.ts b/src/routes/(app)/ecash/[id]/[...version]/+page.server.ts index 68ccfda6..fa7bf474 100644 --- a/src/routes/(app)/ecash/[id]/[...version]/+page.server.ts +++ b/src/routes/(app)/ecash/[id]/[...version]/+page.server.ts @@ -1,5 +1,12 @@ -import { fail, redirect } from "@sveltejs/kit"; +import getRates from "$lib/rates"; import { auth, fd, post } from "$lib/utils"; +import { fail, redirect } from "@sveltejs/kit"; + +export async function load({ parent }) { + const { user } = await parent(); + const rates = await getRates(); + return { rate: rates[user.currency] }; +} export const actions = { default: async ({ cookies, request, url }) => { |
