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 Feb 6, 2024
1 parent 905eabc commit 9931404
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);

Check warning on line 10 in src/controllers/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/controllers/trackingPlan.ts#L10

Added line #L10 was not covered by tests
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) {

Check warning on line 16 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L16

Added line #L16 was not covered by tests
let toAdd: any;
let exceptionOccured = false;

Check warning on line 18 in src/services/trackingPlan.ts

View check run for this annotation

Codecov / codecov/patch

src/services/trackingPlan.ts#L18

Added line #L18 was not covered by tests

try {
Expand Down

0 comments on commit 9931404

Please sign in to comment.