Browse Source

use proper id type in requests

pull/1/head
rozetko 3 years ago
parent
commit
1654199048
  1. 2
      server/src/routes/detections_router.ts
  2. 2
      server/src/routes/segments_router.ts

2
server/src/routes/detections_router.ts

@ -10,7 +10,7 @@ declare type DetectionSpansResponse = {
}
export async function getDetectionSpans(ctx: Router.IRouterContext) {
const id = ctx.request.query.id as AnalyticUnitId;
const id = ctx.request.query.id as string;
if(id === undefined || id === '') {
throw new Error('analyticUnitId (id) is missing');
}

2
server/src/routes/segments_router.ts

@ -7,7 +7,7 @@ import * as Router from 'koa-router';
export async function getSegments(ctx: Router.IRouterContext) {
const id = ctx.request.query.id as AnalyticUnitId;
const id = ctx.request.query.id as string;
if(id === undefined || id === '') {
throw new Error('analyticUnitId (id) is missing');
}

Loading…
Cancel
Save