Skip to content

Commit

Permalink
fix the await clause
Browse files Browse the repository at this point in the history
  • Loading branch information
abhimanyubabbar committed Mar 11, 2024
1 parent b5deefe commit 646608d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/trackingPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/services/trackingPlan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 646608d

Please sign in to comment.