refs #983 Use static method to call instance API

This commit is contained in:
AkiraFukushima 2019-07-29 23:35:49 +09:00
parent 1c836dfb95
commit 8ce514a4fb
1 changed files with 1 additions and 2 deletions

View File

@ -3,8 +3,7 @@ import log from 'electron-log'
import { LocalAccount } from '~/src/types/localAccount'
const StreamingURL = async (account: LocalAccount): Promise<string> => {
const client = new Mastodon(account.accessToken!, account.baseURL + '/api/v1')
const res = await client.get<Instance>('/instance')
const res = await Mastodon.get<Instance>('/api/v1/instance', {}, account.baseURL)
return res.data.urls.streaming_api
}