aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/invoice
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-09-23 16:22:10 -0700
committerAdam Soltys <[email protected]>2024-09-23 16:22:10 -0700
commit52871e09d9218f3f2fb2ce4bd6e97f5c1fc15480 (patch)
tree543a0af922d193940846e7a953ed7b027a931e30 /src/routes/(app)/send/invoice
parent200c5ff1f4e41ed907a1dd4a0337d8ee0a94b8be (diff)
downloadcoinos-ui-52871e09d9218f3f2fb2ce4bd6e97f5c1fc15480.tar.gz
coinos-ui-52871e09d9218f3f2fb2ce4bd6e97f5c1fc15480.zip
account import
Diffstat (limited to 'src/routes/(app)/send/invoice')
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.server.ts5
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}`);
},
};