Skip to content

Commit

Permalink
Mock out /clinical-event-type-counts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbioportal import user committed Sep 26, 2024
1 parent fbe4e2c commit ce1b867
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/cbioportal/web/StudyViewController.java
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,12 @@ public ResponseEntity<List<ClinicalEventTypeCount>> getClinicalEventTypeCounts(
@RequestAttribute(required = false, value = "interceptedStudyViewFilter")
StudyViewFilter interceptedStudyViewFilter
) {
List<String> studyIds = interceptedStudyViewFilter.getStudyIds();
if (studyIds.size() == 1 && studyIds.get(0).equals("enclave_2024")) {
List<ClinicalEventTypeCount> empty = new ArrayList<>();
return new ResponseEntity<>(empty, HttpStatus.OK);
}

boolean unfilteredQuery = studyViewFilterUtil.isUnfilteredQuery(interceptedStudyViewFilter);
List<ClinicalEventTypeCount> eventTypeCounts = this.getInstance().cachedClinicalEventTypeCounts(interceptedStudyViewFilter,
unfilteredQuery);
Expand Down

0 comments on commit ce1b867

Please sign in to comment.