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)/send/invoice/[id]/+page.server.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/routes/(app)/send/invoice') diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts index c31bcd7b..6c89912d 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.ts +++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts @@ -22,16 +22,17 @@ export async function load({ params: { id }, parent }) { export const actions = { default: async ({ cookies, params: { id }, request }) => { + let p; try { let body = await fd(request); body.hash = id; - await post("/payments", body, auth(cookies)); + p = await post("/payments", body, auth(cookies)); } catch (e: any) { console.log("payment failed", id, e); error(500, e.message); } - redirect(307, "/sent"); + redirect(307, `/sent/${p.id}`); }, }; -- cgit v1.2.3