1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-02 23:19:57 +00:00
elk/composables/client.ts
2022-11-23 07:08:36 +08:00

10 lines
339 B
TypeScript

import { login } from 'masto'
import { currentUser } from './accounts'
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,
})