1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-20 01:28:01 +09:00
elk/composables/client.ts

10 lines
336 B
TypeScript
Raw Normal View History

2022-11-23 08:08:36 +09:00
import { login } from 'masto'
2022-11-23 13:25:48 +09:00
import { currentUser } from './users'
2022-11-23 08:08:36 +09:00
import { DEFAULT_SERVER } from '~/constants'
2022-11-13 14:34:43 +09:00
2022-11-23 08:08:36 +09: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,
})