2022-11-22 23:08:36 +00:00
|
|
|
import { login } from 'masto'
|
|
|
|
import { currentUser } from './accounts'
|
|
|
|
import { DEFAULT_SERVER } from '~/constants'
|
2022-11-13 05:34:43 +00:00
|
|
|
|
2022-11-22 23:08:36 +00:00
|
|
|
// TODO: improve upsteam to make this synchronous (delayed auth)
|
|
|
|
export const masto = await login({
|
|
|
|
url: `https://${currentUser.value?.server || DEFAULT_SERVER}`,
|
|
|
|
accessToken: currentUser.value?.token || undefined,
|
|
|
|
})
|