diff options
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) { |
