feat: use state based auth instead of store based (#488)
* misc: switch to state for auth * fix: class based auth not working
This commit is contained in:
1 parent
8c6ff77fac
commit
5651ad475d
83 files changed
+395
-469
No files matched your search
@@ -27,7 +27,7 @@
|
||||
action: () => removeAdmin(id, true),
|
||||
})
|
||||
|
||||
if (!$profile?.jwt) return
|
||||
if (!profile.data?.jwt) return
|
||||
|
||||
const result = await trycatch(() =>
|
||||
getClient().addAdmin({
|
||||
@@ -75,10 +75,14 @@
|
||||
class="flex flex-row items-center gap-2 mt-auto w-full"
|
||||
onsubmit={preventDefault(() => {
|
||||
trycatch(async () => {
|
||||
if (!$profile?.jwt || newAdmin == '') return
|
||||
if (!profile.data?.jwt || newAdmin == '') return
|
||||
adding = true
|
||||
|
||||
const r = await addAdmin(`${newAdmin}@${$instance}`, true, $profile.jwt)
|
||||
const r = await addAdmin(
|
||||
`${newAdmin}@${$instance}`,
|
||||
true,
|
||||
profile.data.jwt,
|
||||
)
|
||||
if (!r) return
|
||||
|
||||
toast({
|
||||
|
||||
Reference in new issue
Block a user