From 0212fe0032eb0c5d6bfb74ebaab42543b73d6d6b Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 8 Oct 2023 00:17:32 -0700 Subject: payments fixes --- src/lib/invoice.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/invoice.js') diff --git a/src/lib/invoice.js b/src/lib/invoice.js index 23ce1757..218972c6 100644 --- a/src/lib/invoice.js +++ b/src/lib/invoice.js @@ -21,16 +21,16 @@ export default async ({ cookies, request, url }) => { let user = { username: form.get('username'), currency: form.get('currency') }; invoice = await post('/invoice', { invoice, user }, auth(cookies)); - let { hash } = invoice; + let { id } = invoice; if (request_id) { if (url.pathname.endsWith('tip')) { - throw redirect(307, `/send/invoice/${hash}`); + throw redirect(307, `/send/invoice/${id}`); } throw redirect(307, `/${user.username}/request/${request_id}`); } - if (invoice.prompt) throw redirect(307, `/${user.username}/invoice/${hash}/tip`); - else throw redirect(307, `/${user.username}/invoice/${hash}`); + if (invoice.prompt) throw redirect(307, `/${user.username}/invoice/${id}/tip`); + else throw redirect(307, `/${user.username}/invoice/${id}`); }; -- cgit v1.2.3