aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-01-15 13:18:34 -0800
committerAdam Soltys <[email protected]>2025-01-15 13:18:34 -0800
commitc6add8ed135e23c566b1d9a25651482370989b55 (patch)
treefe6afe541102ef1549e2466882ddd3e68c559809 /src
parent6fc7530fda9dd5f4858523ef9fd2ced48ba80bf4 (diff)
downloadcoinos-ui-c6add8ed135e23c566b1d9a25651482370989b55.tar.gz
coinos-ui-c6add8ed135e23c566b1d9a25651482370989b55.zip
redirect
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/sign/+page.server.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/routes/(app)/sign/+page.server.ts b/src/routes/(app)/sign/+page.server.ts
index c10f183c..b0e319f0 100644
--- a/src/routes/(app)/sign/+page.server.ts
+++ b/src/routes/(app)/sign/+page.server.ts
@@ -1,6 +1,10 @@
import { auth, fd, post, types } from "$lib/utils";
+import { redirect } from "@sveltejs/kit";
+
+export async function load({ cookies, parent, url }) {
+ const { user } = await parent();
+ if (!user) redirect(307, `/register?redirect=${url.pathname}`);
-export async function load({ cookies }) {
const invoice = {
address_type: "legacy",
type: types.bitcoin,