diff --git a/src/controllers/trackingPlan.ts b/src/controllers/trackingPlan.ts index f96be6a5f7..e4802cfc4d 100644 --- a/src/controllers/trackingPlan.ts +++ b/src/controllers/trackingPlan.ts @@ -7,7 +7,7 @@ export class TrackingPlanController { const events = ctx.request.body; const requestSize = Number(ctx.request.get('content-length')); const reqParams = ctx.request.query; - const response = TrackingPlanservice.validate(events, requestSize, reqParams); + const response = await TrackingPlanservice.validate(events, requestSize, reqParams); ctx.body = response.body; ControllerUtility.postProcess(ctx, response.status); return ctx; diff --git a/src/services/trackingPlan.ts b/src/services/trackingPlan.ts index 89544cd9c8..64bb65a0f7 100644 --- a/src/services/trackingPlan.ts +++ b/src/services/trackingPlan.ts @@ -13,8 +13,8 @@ export class TrackingPlanservice { const metaTags = events.length && events[0].metadata ? getMetadata(events[0].metadata) : {}; let ctxStatusCode = 200; - for(let event of events) { - let toAdd; + for (let event of events) { + let toAdd: any; let exceptionOccured = false; try {