fix: improper route gating (#596)

This commit is contained in:
Xylight authored and GitHub committed 2025-06-25 19:01:00 +00:00
1 parent a8b65750ca
commit 9f4790326f
6 files changed
+25 -20

No files matched your search

+3
View File
@@ -1,10 +1,13 @@
import { profile } from '$lib/auth.svelte'
import { client } from '$lib/lemmy.svelte.js'
import { error } from '@sveltejs/kit'
// disable ssr, as the server cannot be authenticated
export const ssr = false
export async function load({ fetch }) {
if (!profile.data.jwt) error(401)
const my_user =
// profile.data?.user ??
(await client({ auth: profile.data?.jwt, func: fetch }).getSite()).my_user