diff options
Diffstat (limited to 'src/routes/(app)/send/invoice')
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.server.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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}`); }, }; |
