chore(ui): remove axios from dashboards API

pull/5866/head
Pavel Zavora 2022-02-15 09:38:57 +01:00
parent 50bd143c57
commit f1ff56c2c8
2 changed files with 2 additions and 4 deletions

View File

@ -8,7 +8,6 @@ import {
} from 'src/dashboards/utils/dashboardSwitcherLinks'
import {instantiateProtoboard} from 'src/dashboards/utils/protoboardToDashboard'
import {AxiosResponse} from 'axios'
import {
DashboardsResponse,
GetDashboards,
@ -21,7 +20,7 @@ export const getDashboards: GetDashboards = () => {
return AJAX<DashboardsResponse>({
method: 'GET',
resource: 'dashboards',
}) as Promise<AxiosResponse<DashboardsResponse>>
}) as Promise<{data: DashboardsResponse}>
}
export const loadDashboardLinks = async (

View File

@ -1,11 +1,10 @@
import {Dashboard} from 'src/types/dashboards'
import {AxiosResponse} from 'axios'
export interface DashboardsResponse {
dashboards: Dashboard[]
}
export type GetDashboards = () => Promise<AxiosResponse<DashboardsResponse>>
export type GetDashboards = () => Promise<{data: DashboardsResponse}>
export interface LoadLinksOptions {
activeDashboard: Dashboard
dashboardsAJAX?: GetDashboards