From 52871e09d9218f3f2fb2ce4bd6e97f5c1fc15480 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 23 Sep 2024 16:22:10 -0700 Subject: account import --- src/routes/(app)/pay/[username]/[...amount]/+page.server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/routes/(app)/pay') diff --git a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts index 7ccc23b0..cf8143f0 100644 --- a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts +++ b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts @@ -37,14 +37,15 @@ export async function load({ cookies, params, parent }) { export const actions = { default: async ({ cookies, request }) => { + let p; try { let body = await fd(request); - await post("/payments", body, auth(cookies)); + p = await post("/payments", body, auth(cookies)); } catch (e: any) { console.log(e); return fail(400, { message: e.message }); } - redirect(307, "/sent"); + redirect(307, `/sent/${p.id}`); }, }; -- cgit v1.2.3