diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/sign/+page.server.ts | 6 |
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, |
