BUR-58 добавлен видео-блок
This commit is contained in:
7
src/entities/camera/api.ts
Normal file
7
src/entities/camera/api.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { getJson } from '../../shared/api/http';
|
||||
import { cloudApiUrl } from '../../shared/config/env';
|
||||
import type { CameraResponse } from './types';
|
||||
|
||||
export function getCameras(edge: string): Promise<CameraResponse> {
|
||||
return getJson<CameraResponse>(cloudApiUrl, '/camera', { edge });
|
||||
}
|
||||
9
src/entities/camera/types.ts
Normal file
9
src/entities/camera/types.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export type CameraItem = {
|
||||
protocol: string;
|
||||
source: string;
|
||||
};
|
||||
|
||||
export type CameraResponse = {
|
||||
edge: string;
|
||||
items: CameraItem[];
|
||||
};
|
||||
Reference in New Issue
Block a user