13 lines
324 B
TypeScript
13 lines
324 B
TypeScript
import { CameraResponseDto } from './dto/camera-response.dto';
|
|
import { CameraRow } from './camera.types';
|
|
|
|
export function createCameraResponse(edge: string, rows: CameraRow[]): CameraResponseDto {
|
|
return {
|
|
edge,
|
|
items: rows.map((row) => ({
|
|
protocol: row.protocol,
|
|
source: row.source,
|
|
})),
|
|
};
|
|
}
|