mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-25 10:46:17 +03:00
9 lines
336 B
TypeScript
9 lines
336 B
TypeScript
import { login } from 'masto'
|
|
import { currentUser } from './users'
|
|
import { DEFAULT_SERVER } from '~/constants'
|
|
|
|
// 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,
|
|
})
|