feat: add admin configuration
This commit is contained in:
1 parent
f83f2f8cc8
commit
bfc4ef6ffe
14 files changed
+287
-53
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { get } from 'svelte/store'
|
||||
import { getClient, site as siteStore } from '$lib/lemmy.js'
|
||||
|
||||
export async function load({ fetch }) {
|
||||
if (!get(profile)) return
|
||||
let { jwt } = get(profile)!
|
||||
let site = get(siteStore)
|
||||
|
||||
if (!site) {
|
||||
const res = await getClient(undefined, fetch).getSite({
|
||||
auth: jwt,
|
||||
})
|
||||
|
||||
site = res
|
||||
}
|
||||
|
||||
return {
|
||||
site: site,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user