auth: update profile class to contain profileData as well

This commit is contained in:
James Xylight committed 2025-07-12 10:56:38 -07:00
1 parent 36a9631707
commit 185cc5f54d
13 files changed
+238 -265

No files matched your search

+2 -2
View File
@@ -3,7 +3,6 @@
import { goto } from '$app/navigation'
import { page } from '$app/state'
import { setUser } from '$lib/auth.svelte.js'
import ErrorContainer, {
clearErrorScope,
pushError,
@@ -25,6 +24,7 @@
QuestionMarkCircle,
UserCircle,
} from 'svelte-hero-icons'
import { profile } from '$lib/auth.svelte'
interface Props {
ref?: string
@@ -57,7 +57,7 @@
})
if (response?.jwt) {
const result = await setUser(response.jwt, data.instance, data.username)
const result = await profile.add(response.jwt, data.instance)
if (result) {
toast({ content: $t('toast.logIn'), type: 'success' })