9 lines
455 B
TypeScript
9 lines
455 B
TypeScript
import { getJson } from '../../shared/api/http';
|
||
import { cloudApiUrl } from '../../shared/config/env';
|
||
import type { HistoryRequest, HistoryResponse } from './types';
|
||
|
||
/** Запрашивает исторический ряд с avg-линией и min/max-диапазоном для графика. */
|
||
export function getHistory(params: HistoryRequest): Promise<HistoryResponse> {
|
||
return getJson<HistoryResponse>(cloudApiUrl, '/history', params);
|
||
}
|