Fix icons
This commit is contained in:
@@ -15,7 +15,11 @@ async function get<T>(path: string, params: Record<string, string> = {}): Promis
|
||||
export const api = {
|
||||
position: (fields?: string) => get<{latitude: number, longitude: number, altitude: number}>('/api/position', fields ? { fields } : {}),
|
||||
current: (fields?: string) => get<DataRow>('/api/current', fields ? { fields } : {}),
|
||||
hourly: (start?: string, end?: string, fields?: string) => get<DataRow[]>('/api/hourly', { ...(start ? { start } : {}), ...(end ? { end } : {}), ...(fields ? { fields } : {}) }),
|
||||
hourly: (start?: Date, end?: Date, fields?: string) => get<DataRow[]>('/api/hourly', {
|
||||
...(start ? { start: start.toISOString().slice(0, 10) } : {}),
|
||||
...(end ? { end: end.toISOString().slice(0, 10) } : {}),
|
||||
...(fields ? { fields } : {})
|
||||
}),
|
||||
daily: (start?: Date, end?: Date, fields?: string) => get<DataRow[]>('/api/daily', {
|
||||
...(start ? { start: start.toISOString().slice(0, 10) } : {}),
|
||||
...(end ? { end: end.toISOString().slice(0, 10) } : {}),
|
||||
|
||||
Reference in New Issue
Block a user