uprava FE pro multisite
This commit is contained in:
@@ -30,6 +30,24 @@ export async function getBackendHealthDetailed(): Promise<HealthDetailedResponse
|
||||
return data
|
||||
}
|
||||
|
||||
/** Aktivní lokality pro výběr v UI (`GET /me/sites`). */
|
||||
export type MeSiteRow = {
|
||||
id: number
|
||||
code: string
|
||||
name: string
|
||||
timezone: string
|
||||
latitude?: number | string | null
|
||||
longitude?: number | string | null
|
||||
active: boolean
|
||||
notes?: string | null
|
||||
created_at?: string
|
||||
}
|
||||
|
||||
export async function getMySites(): Promise<MeSiteRow[]> {
|
||||
const { data } = await client.get<MeSiteRow[]>('/me/sites')
|
||||
return Array.isArray(data) ? data : []
|
||||
}
|
||||
|
||||
export async function getSiteStatusFull(siteId: number): Promise<FullStatusResponse> {
|
||||
const { data } = await client.get<FullStatusResponse>(`/sites/${siteId}/status/full`)
|
||||
return data
|
||||
|
||||
Reference in New Issue
Block a user