Skip to content

Commit

Permalink
no need to leak the AgeBucket object IDs out in API responses #2670
Browse files Browse the repository at this point in the history
  • Loading branch information
iamleeg committed Apr 22, 2022
1 parent 864b0cd commit f7edeb4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data-serving/data-service/src/controllers/case.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ const dtoFromCase = async (storedCase: LeanDocument<CaseDocument>) => {
}
}
}
// although the type system can't see it, there's an ageBuckets property on the demographics DTO now
delete (dto as unknown as { demographics: { ageBuckets?: [ObjectId] }}).demographics.ageBuckets;
}
delete dto.restrictedNotes;

Expand Down

0 comments on commit f7edeb4

Please sign in to comment.