fix: improper route gating (#596)
This commit is contained in:
1 parent
a8b65750ca
commit
9f4790326f
6 files changed
+25
-20
No files matched your search
@@ -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
|
||||
|
||||
Reference in new issue
Block a user