diff options
| author | Adam Soltys <[email protected]> | 2023-01-18 19:44:27 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-18 19:44:27 -0800 |
| commit | 0e0f39af2e6585d7b61cf67652cdc0c2b2f06eb8 (patch) | |
| tree | 85e0fb00f3aa89fdde1cbb667bf801564bff7610 /src/lib/invoice.js | |
| parent | 7de4b0d2cd330674dcd02d2b007c1477fd48caaa (diff) | |
| download | coinos-ui-0e0f39af2e6585d7b61cf67652cdc0c2b2f06eb8.tar.gz coinos-ui-0e0f39af2e6585d7b61cf67652cdc0c2b2f06eb8.zip | |
pots
Diffstat (limited to 'src/lib/invoice.js')
| -rw-r--r-- | src/lib/invoice.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/invoice.js b/src/lib/invoice.js index c81b4061..fa29130e 100644 --- a/src/lib/invoice.js +++ b/src/lib/invoice.js @@ -19,19 +19,19 @@ export default async ({ cookies, request, url }) => { let user = { username: form.get('username'), currency: form.get('currency') }; - let { id } = await post('/invoice', { invoice, user }, auth(cookies)); + let { hash } = await post('/invoice', { invoice, user }, auth(cookies)); if (request_id) { if (url.pathname.endsWith('tip')) { - throw redirect(307, `/send/${id}`); + throw redirect(307, `/send/${hash}`); } throw redirect(307, `/${user.username}/request/${request_id}`); } if (invoice.prompt) { - throw redirect(307, `/invoice/${id}/tip`); + throw redirect(307, `/invoice/${hash}/tip`); } else { - throw redirect(307, `/invoice/${id}`); + throw redirect(307, `/invoice/${hash}`); } }; |
