mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Fixes
This commit is contained in:
@ -21,6 +21,11 @@ export type Params = {
|
||||
>
|
||||
}
|
||||
|
||||
export type InstanceResponse<T = unknown> = {
|
||||
body: T
|
||||
links: { prev?: string; next?: string }
|
||||
}
|
||||
|
||||
const apiInstance = async <T = unknown>({
|
||||
method,
|
||||
version = 'v1',
|
||||
@ -29,7 +34,7 @@ const apiInstance = async <T = unknown>({
|
||||
headers,
|
||||
body,
|
||||
extras
|
||||
}: Params): Promise<{ body: T; links: { prev?: string; next?: string } }> => {
|
||||
}: Params): Promise<InstanceResponse<T>> => {
|
||||
const { store } = require('@root/store')
|
||||
const state = store.getState() as RootState
|
||||
const instanceActive = state.instances.instances.findIndex(
|
||||
|
Reference in New Issue
Block a user