From 28eb2ba7d6298783c2e5be3db5f8b4690acd51cc Mon Sep 17 00:00:00 2001 From: Alexey Velikiy Date: Tue, 14 Aug 2018 17:19:00 +0300 Subject: [PATCH] start->from & finish->to in segments --- src/services/analytic_service.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/analytic_service.ts b/src/services/analytic_service.ts index af18275..ad06f95 100644 --- a/src/services/analytic_service.ts +++ b/src/services/analytic_service.ts @@ -42,8 +42,8 @@ export class AnalyticService { ): Promise { const getJSONs = (segs: SegmentsSet) => segs.getSegments().map(segment => ({ - "start": segment.from, - "finish": segment.to + "from": segment.from, + "to": segment.to })); var payload = { @@ -75,8 +75,8 @@ export class AnalyticService { if(data.segments === undefined) { throw new Error('Server didn`t return segments array'); } - var segments = data.segments as { id: SegmentId, start: number, finish: number, labeled: boolean }[]; - return segments.map(s => new AnalyticSegment(s.labeled, s.id, s.start, s.finish)); + var segments = data.segments as { id: SegmentId, from: number, to: number, labeled: boolean }[]; + return segments.map(s => new AnalyticSegment(s.labeled, s.id, s.from, s.to)); } async * getStatusGenerator(id: AnalyticUnitId, duration: number) {