20 lines
646 B
TypeScript
20 lines
646 B
TypeScript
import type { DashboardResponse, EnvironmentHealth, DatabaseInfo } from './dto/dashboard'
|
|
|
|
export function getDashboard(): Promise<DashboardResponse> {
|
|
return useApi().get<DashboardResponse>('/dashboard', undefined, {
|
|
toast: false,
|
|
})
|
|
}
|
|
|
|
export function getEnvironmentHealth(envId: number): Promise<EnvironmentHealth> {
|
|
return useApi().get<EnvironmentHealth>(`/environments/${envId}/health`, undefined, {
|
|
toast: false,
|
|
})
|
|
}
|
|
|
|
export function getDatabaseInfo(envId: number): Promise<DatabaseInfo> {
|
|
return useApi().get<DatabaseInfo>(`/environments/${envId}/database`, undefined, {
|
|
toast: false,
|
|
})
|
|
}
|