diff options
| author | Adam Soltys <[email protected]> | 2023-01-25 23:01:55 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-01-25 23:01:55 -0800 |
| commit | 06d21d381123f5da01bc92aaff7c185f62e754ca (patch) | |
| tree | 071975ffa4c30f81a7a25b78b4cfd5f85fdf7ea5 /src/routes/(app)/ln | |
| parent | d5b26e787a0c4c1b0a757f58b537f0a890cb9133 (diff) | |
| download | coinos-ui-06d21d381123f5da01bc92aaff7c185f62e754ca.tar.gz coinos-ui-06d21d381123f5da01bc92aaff7c185f62e754ca.zip | |
sveltekit 1.0
Diffstat (limited to 'src/routes/(app)/ln')
| -rw-r--r-- | src/routes/(app)/ln/[lnurl]/+page.server.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/(app)/ln/[lnurl]/+page.server.js b/src/routes/(app)/ln/[lnurl]/+page.server.js index ded2e58c..6f61143f 100644 --- a/src/routes/(app)/ln/[lnurl]/+page.server.js +++ b/src/routes/(app)/ln/[lnurl]/+page.server.js @@ -1,5 +1,5 @@ import { auth, get, post } from '$lib/utils'; -import { error, invalid, redirect } from '@sveltejs/kit'; +import { error, fail, redirect } from '@sveltejs/kit'; export async function load({ params }) { try { @@ -22,7 +22,7 @@ export const actions = { if (amount < minSendable) error = `Amount must be at least ${minSendable} sats`; if (amount > maxSendable) error = `Amount must be at most ${maxSendable} sats`; - if (error) return invalid(400, { error }); + if (error) return fail(400, { error }); let { pr } = await fetch(`${callback}?amount=${amount}`).then((r) => r.json()); throw redirect(307, `/send/lightning/${pr}`); |
