From 1654199048924452e4cd8218c9b3a216ff9c7ae7 Mon Sep 17 00:00:00 2001 From: rozetko Date: Thu, 27 May 2021 16:14:57 +0300 Subject: [PATCH] use proper id type in requests --- server/src/routes/detections_router.ts | 2 +- server/src/routes/segments_router.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/routes/detections_router.ts b/server/src/routes/detections_router.ts index 84ade36..0f6f53d 100644 --- a/server/src/routes/detections_router.ts +++ b/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'); } diff --git a/server/src/routes/segments_router.ts b/server/src/routes/segments_router.ts index 6dc4a64..79736d7 100644 --- a/server/src/routes/segments_router.ts +++ b/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'); }