1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00

Added instance configuration support

This commit is contained in:
Zhiyuan Zheng
2021-11-15 22:34:43 +01:00
parent 98dd7b2b46
commit 7ac789c18c
16 changed files with 302 additions and 101 deletions

View File

@ -0,0 +1,12 @@
import apiInstance from '@api/instance'
import { createAsyncThunk } from '@reduxjs/toolkit'
export const updateConfiguration = createAsyncThunk(
'instances/updateConfiguration',
async (): Promise<Mastodon.Instance> => {
return apiInstance<Mastodon.Instance>({
method: 'get',
url: `instance`
}).then(res => res.body)
}
)