From 75e1e4e6aa2dbc7d400df1860758db28bf44b7a3 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 13 Jan 2023 20:26:53 -0800 Subject: server redis migration --- src/lib/invoice.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib/invoice.js') diff --git a/src/lib/invoice.js b/src/lib/invoice.js index 79639d84..c81b4061 100644 --- a/src/lib/invoice.js +++ b/src/lib/invoice.js @@ -17,21 +17,21 @@ export default async ({ cookies, request, url }) => { request_id }; - let user = { username: form.get('username') }; + let user = { username: form.get('username'), currency: form.get('currency') }; - let { uuid } = await post('/invoice', { invoice, user }, auth(cookies)); + let { id } = await post('/invoice', { invoice, user }, auth(cookies)); if (request_id) { if (url.pathname.endsWith('tip')) { - throw redirect(307, `/send/${uuid}`); + throw redirect(307, `/send/${id}`); } throw redirect(307, `/${user.username}/request/${request_id}`); } if (invoice.prompt) { - throw redirect(307, `/invoice/${uuid}/tip`); + throw redirect(307, `/invoice/${id}/tip`); } else { - throw redirect(307, `/invoice/${uuid}`); + throw redirect(307, `/invoice/${id}`); } }; -- cgit v1.2.3