Files
ui/src/entities/history/api.ts

9 lines
489 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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, signal?: AbortSignal): Promise<HistoryResponse> {
return getJson<HistoryResponse>(cloudApiUrl, '/history', params, { signal });
}