diff options
| author | Adam Soltys <[email protected]> | 2026-02-11 17:51:24 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 17:51:24 -0800 |
| commit | 13466248004327e9a026cb89f94926f9b060d1c1 (patch) | |
| tree | 47b4972c33809ccdf866b043c92cd3e0ecf5dcd0 /src/routes/(app)/apps | |
| parent | 3aa9ce1b5985397d7f568887ec6f881df13c1034 (diff) | |
| download | coinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.tar.gz coinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.zip | |
linting
Diffstat (limited to 'src/routes/(app)/apps')
| -rw-r--r-- | src/routes/(app)/apps/[pubkey]/+page.server.ts | 32 | ||||
| -rw-r--r-- | src/routes/(app)/apps/[pubkey]/payments/+page.server.ts | 4 | ||||
| -rw-r--r-- | src/routes/(app)/apps/new/+page.server.ts | 54 |
3 files changed, 45 insertions, 45 deletions
diff --git a/src/routes/(app)/apps/[pubkey]/+page.server.ts b/src/routes/(app)/apps/[pubkey]/+page.server.ts index a2cc50e7..ff10668f 100644 --- a/src/routes/(app)/apps/[pubkey]/+page.server.ts +++ b/src/routes/(app)/apps/[pubkey]/+page.server.ts @@ -3,24 +3,24 @@ import { auth, fd, get, post } from "$lib/utils"; import { fail, redirect } from "@sveltejs/kit"; export const load = async ({ cookies, params, parent }) => { - const { pubkey } = params; - const { user } = await parent(); - const rates = await getRates(); - const rate = rates[user.currency]; - const app = await get(`/app/${pubkey}`, auth(cookies)); - return { app, rate }; + const { pubkey } = params; + const { user } = await parent(); + const rates = await getRates(); + const rate = rates[user.currency]; + const app = await get(`/app/${pubkey}`, auth(cookies)); + return { app, rate }; }; export const actions = { - default: async ({ cookies, request }) => { - try { - const body = await fd(request); - await post("/app", body, auth(cookies)); - } catch (e) { - const { message: error } = e as Error; - return fail(400, { error }); - } + default: async ({ cookies, request }) => { + try { + const body = await fd(request); + await post("/app", body, auth(cookies)); + } catch (e) { + const { message: error } = e as Error; + return fail(400, { error }); + } - redirect(307, "/settings/nostr"); - }, + redirect(307, "/settings/nostr"); + }, }; diff --git a/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts b/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts index 546dacdf..0df40562 100644 --- a/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts +++ b/src/routes/(app)/apps/[pubkey]/payments/+page.server.ts @@ -1,6 +1,6 @@ import { auth, get } from "$lib/utils"; export const load = async ({ cookies, params }) => { - const app = await get(`/app/${params.pubkey}`, auth(cookies)); - return { app }; + const app = await get(`/app/${params.pubkey}`, auth(cookies)); + return { app }; }; diff --git a/src/routes/(app)/apps/new/+page.server.ts b/src/routes/(app)/apps/new/+page.server.ts index eaecfd68..a78b9093 100644 --- a/src/routes/(app)/apps/new/+page.server.ts +++ b/src/routes/(app)/apps/new/+page.server.ts @@ -3,39 +3,39 @@ import { auth, fd, post } from "$lib/utils"; import { fail, redirect } from "@sveltejs/kit"; export const load = async ({ parent, url }) => { - const { user } = await parent(); + const { user } = await parent(); - if (!user) - redirect( - 307, - `/login?redirect=${encodeURIComponent(url.pathname + url.search)}`, - ); + if (!user) + redirect( + 307, + `/login?redirect=${encodeURIComponent(url.pathname + url.search)}`, + ); - let max_amount = url.searchParams.get("max_amount"); - max_amount = max_amount ? Math.round(Number(max_amount) / 1000) : undefined; + let max_amount = url.searchParams.get("max_amount"); + max_amount = max_amount ? Math.round(Number(max_amount) / 1000) : undefined; - const app = { - name: url.searchParams.get("name"), - pubkey: url.searchParams.get("pubkey"), - max_amount, - budget_renewal: url.searchParams.get("budget_renewal"), - }; + const app = { + name: url.searchParams.get("name"), + pubkey: url.searchParams.get("pubkey"), + max_amount, + budget_renewal: url.searchParams.get("budget_renewal"), + }; - const rates = await getRates(); - const rate = rates[user.currency]; - return { app, rate }; + const rates = await getRates(); + const rate = rates[user.currency]; + return { app, rate }; }; export const actions = { - default: async ({ cookies, request }) => { - try { - const body = await fd(request); - await post("/app", body, auth(cookies)); - } catch (e) { - const { message: error } = e as Error; - return fail(400, { error }); - } + default: async ({ cookies, request }) => { + try { + const body = await fd(request); + await post("/app", body, auth(cookies)); + } catch (e) { + const { message: error } = e as Error; + return fail(400, { error }); + } - redirect(307, "/settings/nostr"); - }, + redirect(307, "/settings/nostr"); + }, }; |
