feat: switch to new account system

This commit is contained in:
Xyphyn committed 2023-08-01 13:00:06 -07:00
1 parent 54ab6fdc82
commit 2da415b670
38 files changed
+222 -362

No files matched your search

+5 -4
View File
@@ -1,12 +1,13 @@
import { authData, getClient } from '$lib/lemmy.js'
import { profile } from '$lib/auth.js'
import { getClient } from '$lib/lemmy.js'
import { getInboxItemPublished } from '$lib/lemmy/inbox.js'
import { get } from 'svelte/store'
type InboxFeedType = 'replies' | 'mentions' | 'messages' | 'all'
export async function load({ url }) {
const auth = get(authData)
if (!auth) return
const auth = get(profile)
if (!auth?.jwt) return
const type: InboxFeedType =
(url.searchParams.get('type') as InboxFeedType) || 'all'
@@ -18,7 +19,7 @@ export async function load({ url }) {
const params = {
limit: 50,
page: page,
auth: auth.token,
auth: auth.jwt,
unread_only: unreadOnly,
}