Browse Source

start->from & finish->to in segments

master
Coin de Gamma 6 years ago
parent
commit
28eb2ba7d6
  1. 8
      src/services/analytic_service.ts

8
src/services/analytic_service.ts

@ -42,8 +42,8 @@ export class AnalyticService {
): Promise<SegmentId[]> {
const getJSONs = (segs: SegmentsSet<Segment>) => 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) {

Loading…
Cancel
Save