aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/apps/new
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-11 17:51:24 -0800
committerAdam Soltys <[email protected]>2026-02-11 17:51:24 -0800
commit13466248004327e9a026cb89f94926f9b060d1c1 (patch)
tree47b4972c33809ccdf866b043c92cd3e0ecf5dcd0 /src/routes/(app)/apps/new
parent3aa9ce1b5985397d7f568887ec6f881df13c1034 (diff)
downloadcoinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.tar.gz
coinos-ui-13466248004327e9a026cb89f94926f9b060d1c1.zip
linting
Diffstat (limited to 'src/routes/(app)/apps/new')
-rw-r--r--src/routes/(app)/apps/new/+page.server.ts54
1 files changed, 27 insertions, 27 deletions
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");
+ },
};