mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Full login flow working
Refresh can be faster
This commit is contained in:
@ -22,8 +22,9 @@ const client = async ({
|
||||
}
|
||||
body?: FormData
|
||||
}): Promise<any> => {
|
||||
const state: RootState['instanceInfo'] = store.getState().instanceInfo
|
||||
const url = instanceUrl || store.getState().instanceInfo[instance]
|
||||
const state: RootState['instances'] = store.getState().instances
|
||||
const url =
|
||||
instance === 'remote' ? instanceUrl || state.remote.url : state.local.url
|
||||
|
||||
let response
|
||||
// try {
|
||||
@ -35,7 +36,7 @@ const client = async ({
|
||||
'Content-Type': 'application/json',
|
||||
...headers,
|
||||
...(instance === 'local' && {
|
||||
Authorization: `Bearer ${state.localToken}`
|
||||
Authorization: `Bearer ${state.local.token}`
|
||||
})
|
||||
},
|
||||
...(body && { body: body }),
|
||||
|
Reference in New Issue
Block a user