chore(ui): remove axios from dashboards API
parent
50bd143c57
commit
f1ff56c2c8
|
@ -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 (
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue