aboutsummaryrefslogtreecommitdiffstats
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
commit97f9c4f245fb90df5c8048ac5a9e62208e37c484 (patch)
treefe6afe541102ef1549e2466882ddd3e68c559809
parentcc3899a4fa8d0744777457d59fb4c9f3a2a37cd0 (diff)
downloadcoinos-ui-97f9c4f245fb90df5c8048ac5a9e62208e37c484.tar.gz
coinos-ui-97f9c4f245fb90df5c8048ac5a9e62208e37c484.zip
redirect
-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,