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 | f1b3efe88204ba203667a8dd67ac8ab598af1959 (patch) | |
| tree | 071975ffa4c30f81a7a25b78b4cfd5f85fdf7ea5 /src/routes/(app)/send/user | |
| parent | 2a18749cb9b08726dedf0cfb63971305e50a910a (diff) | |
| download | coinos-ui-f1b3efe88204ba203667a8dd67ac8ab598af1959.tar.gz coinos-ui-f1b3efe88204ba203667a8dd67ac8ab598af1959.zip | |
sveltekit 1.0
Diffstat (limited to 'src/routes/(app)/send/user')
| -rw-r--r-- | src/routes/(app)/send/user/[username]/[...amount]/+page.server.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js index 01712df2..46172175 100644 --- a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js +++ b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js @@ -1,4 +1,4 @@ -import { error, invalid, redirect } from '@sveltejs/kit'; +import { error, fail, redirect } from '@sveltejs/kit'; import { btc as asset, auth, get, post } from '$lib/utils'; export async function load({ params, parent }) { @@ -17,13 +17,13 @@ export const actions = { amount = parseInt(amount); if (!confirmed) { - return invalid(403, { amount, confirm: true }); + return fail(400, { amount, confirm: true }); } await post('/payments', body, auth(cookies)); } catch (e) { console.log(e); - return invalid(400, { message: e.message }); + return fail(400, { message: e.message }); } throw redirect(307, '/sent'); |
