From a9b44cbae79e9c01cff07964a45e1c7efa7fb241 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 5 Dec 2024 19:20:36 -0800 Subject: cached rates --- src/routes/(app)/ln/[lnurl]/+page.server.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/routes/(app)/ln') diff --git a/src/routes/(app)/ln/[lnurl]/+page.server.ts b/src/routes/(app)/ln/[lnurl]/+page.server.ts index b405f427..6f121db1 100644 --- a/src/routes/(app)/ln/[lnurl]/+page.server.ts +++ b/src/routes/(app)/ln/[lnurl]/+page.server.ts @@ -1,11 +1,14 @@ -import { fd, auth, get, post } from "$lib/utils"; +import getRates from "$lib/rates"; +import { auth, fd, get, post } from "$lib/utils"; import { error, fail, redirect } from "@sveltejs/kit"; export async function load({ params, parent }) { const { user } = await parent(); if (!user) redirect(307, "/register"); - let data; + let data = { + rate: await getRates()[user.currency], + }; try { const { lnurl } = params; -- cgit v1.2.3