fix: use masto.loginTo
to update masto api (#474)
This commit is contained in:
parent
ab4321ad33
commit
60a8673757
8 changed files with 19 additions and 14 deletions
|
@ -18,11 +18,12 @@ const defaultMessage = 'Something went wrong'
|
|||
const message = error.message ?? errorCodes[error.statusCode!] ?? defaultMessage
|
||||
|
||||
const state = ref<'error' | 'reloading'>('error')
|
||||
const masto = useMasto()
|
||||
const reload = async () => {
|
||||
state.value = 'reloading'
|
||||
try {
|
||||
if (!useMasto())
|
||||
await loginTo(currentUser.value)
|
||||
if (!masto.loggedIn.value)
|
||||
await masto.loginTo(currentUser.value)
|
||||
clearError({ redirect: currentUser.value ? '/home' : `/${currentServer.value}/public` })
|
||||
}
|
||||
catch {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue