diff options
| author | Adam Soltys <[email protected]> | 2022-11-22 12:09:44 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-22 12:09:44 -0800 |
| commit | 8cf8018f4659ad8bde1e41bd2838b27526bdc34b (patch) | |
| tree | e827d58cd12821b6e9d0827c4839da73df19f8e5 /src/lib | |
| parent | c0f86ea4c2f60ccdabc9076de91d8cabb987b8a3 (diff) | |
| download | coinos-ui-8cf8018f4659ad8bde1e41bd2838b27526bdc34b.tar.gz coinos-ui-8cf8018f4659ad8bde1e41bd2838b27526bdc34b.zip | |
clean up request flow, update translations and deps
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/invoice.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/invoice.js b/src/lib/invoice.js index dbcb837b..6a6ce6a0 100644 --- a/src/lib/invoice.js +++ b/src/lib/invoice.js @@ -2,7 +2,7 @@ import { auth, get, post } from '$lib/utils'; import { redirect } from '@sveltejs/kit'; export default async ({ cookies, request, url }) => { - console.log("WHAT") + console.log('WHAT'); let form = await request.formData(); let rates = await get('/rates'); @@ -23,11 +23,13 @@ export default async ({ cookies, request, url }) => { let { uuid } = await post('/invoice', { invoice, user }, auth(cookies)); if (request_id) { - console.log("WHAT", request_id, url.pathname.endsWith("tip")) - if (url.pathname.endsWith('tip')) throw redirect(307, `/send/${uuid}`); - console.log("HERE WE GO") + if (url.pathname.endsWith('tip')) { + console.log('HUH', url.pathname); + throw redirect(307, `/send/${uuid}`); + } + + console.log('NUH'); throw redirect(307, `/${user.username}/request/${request_id}`); - console.log("NO GO") } if (invoice.prompt) { |
