diff options
Diffstat (limited to 'src/routes/(app)/send/fund')
| -rw-r--r-- | src/routes/(app)/send/fund/[name]/[...amount]/+page.server.ts | 20 |
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}`); + }, }; |
