decompose structure
This commit is contained in:
8
src/entities/history/api.ts
Normal file
8
src/entities/history/api.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user