aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send/user
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/send/user')
-rw-r--r--src/routes/(app)/send/user/[username]/[...amount]/+page.server.js8
1 files changed, 4 insertions, 4 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 1f3a0420..e5fa4452 100644
--- a/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js
+++ b/src/routes/(app)/send/user/[username]/[...amount]/+page.server.js
@@ -9,12 +9,12 @@ export async function load({ cookies, params, parent }) {
let [amount, currency] = params.amount.split("/");
if (subject.username === user?.username)
- throw error(500, { message: "Cannot send to self" });
+ error(500, { message: "Cannot send to self" });
let rate;
if (amount) {
rate = rates[currency ? currency.toUpperCase() : subject.currency];
- if (!rate) throw error(500, "Invalid currency symbol");
+ if (!rate) error(500, "Invalid currency symbol");
if (currency) amount = (amount * sats) / rate;
let { hash } = await post(
@@ -26,7 +26,7 @@ export async function load({ cookies, params, parent }) {
auth(cookies)
);
- throw redirect(307, `/${username}/invoice/${hash}`);
+ redirect(307, `/${username}/invoice/${hash}`);
}
return { amount, rate, subject };
@@ -42,6 +42,6 @@ export const actions = {
return fail(400, { message: e.message });
}
- throw redirect(307, "/sent");
+ redirect(307, "/sent");
},
};