aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/[...text]/+page.server.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.server.ts b/src/routes/(app)/send/[...text]/+page.server.ts
index b24ec1e3..cd259733 100644
--- a/src/routes/(app)/send/[...text]/+page.server.ts
+++ b/src/routes/(app)/send/[...text]/+page.server.ts
@@ -1,9 +1,11 @@
import parse from "$lib/parse";
import { auth, fd, get } from "$lib/utils";
-import { fail } from "@sveltejs/kit";
+import { fail, redirect } from "@sveltejs/kit";
const limit = 10;
-export async function load({ cookies, params, url }) {
+export async function load({ cookies, params, parent, url }) {
+ const { user } = await parent();
+ if (!user) redirect(307, "/login");
const { text } = params;
await parse(text, url.host);