BUR-63 Добавлен abortSignal для прекращения "не успевших" запросов по тегам при сттарте нового запроса диапзона дат

This commit is contained in:
Первов Артем
2026-07-05 05:48:07 +03:00
parent 46cf3da755
commit 095df38e7e
3 changed files with 4 additions and 4 deletions

View File

@@ -3,6 +3,6 @@ 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);
export function getHistory(params: HistoryRequest, signal?: AbortSignal): Promise<HistoryResponse> {
return getJson<HistoryResponse>(cloudApiUrl, '/history', params, { signal });
}