Browse Source

Merge pull request #948 from mstapfner/bgfx-typescript-compilation

Build error - Type 'Record<string, unknown>' is missing the following properties from type AnalyticUnit #947
pull/1/head
rozetko 3 years ago committed by GitHub
parent
commit
98e45d5670
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      server/src/routes/analytic_units_router.ts

2
server/src/routes/analytic_units_router.ts

@ -58,7 +58,7 @@ async function createUnit(ctx: Router.IRouterContext) {
}
async function updateUnit(ctx: Router.IRouterContext) {
const analyticUnitObj = ctx.request.body as AnalyticUnit.AnalyticUnit;
const analyticUnitObj = ctx.request.body as unknown as AnalyticUnit.AnalyticUnit;
if(analyticUnitObj.id === undefined) {
throw new Error('Cannot update undefined id');
}

Loading…
Cancel
Save