aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/fund
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-10-31 09:34:16 -0700
committerAdam Soltys <[email protected]>2024-10-31 09:34:16 -0700
commit243abb0a3d29e8e34e263eec843488e3bdb468a4 (patch)
treebe55931ba0f3c110c3001f56a5339cb63e78b761 /src/routes/(app)/send/fund
parent4742e72ec25823ceeea7848fb2e1f868bed7f472 (diff)
downloadcoinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.tar.gz
coinos-ui-243abb0a3d29e8e34e263eec843488e3bdb468a4.zip
biome
Diffstat (limited to 'src/routes/(app)/send/fund')
-rw-r--r--src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts b/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts
index 2897b159..ed39f96b 100644
--- a/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts
+++ b/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts
@@ -2,16 +2,16 @@ import { fail, redirect } from "@sveltejs/kit";
import { auth, fd, post } from "$lib/utils";
export const actions = {
- default: async ({ cookies, request }) => {
- let body = await fd(request);
- let p;
+ default: async ({ cookies, request }) => {
+ const body = await fd(request);
+ let p;
- try {
- p = await post("/payments", body, auth(cookies));
- } catch (e: any) {
- return fail(400, { message: e.message });
- }
+ try {
+ p = await post("/payments", body, auth(cookies));
+ } catch (e: any) {
+ return fail(400, { message: e.message });
+ }
- if (p) redirect(307, `/fund/${body.name}`);
- },
+ if (p) redirect(307, `/fund/${body.name}`);
+ },
};