1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-06 00:49:58 +00:00
elk/plugins/masto.ts

12 lines
256 B
TypeScript
Raw Normal View History

2022-11-14 02:20:07 +00:00
import { login } from 'masto'
export default defineNuxtPlugin((nuxt) => {
2022-11-15 15:48:23 +00:00
const { server, token } = useAppCookies()
2022-11-15 11:54:07 +00:00
2022-11-14 02:20:07 +00:00
const masto = login({
2022-11-15 15:48:23 +00:00
url: `https://${server.value}`,
2022-11-14 14:54:30 +00:00
accessToken: token.value,
2022-11-14 02:20:07 +00:00
})
nuxt.vueApp.provide('masto', masto)
})