Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Jun 8, 2022
1 parent da85fd5 commit f4335dc
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions controllers/cohortdata.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,14 @@ func (u CohortDataController) RetrieveCohortOverlapStats(c *gin.Context) {
if utils.ContainsNonNil(errors) {
c.JSON(http.StatusBadRequest, gin.H{"message": "bad request"})
c.Abort()
} else {
breakdownStats, err := u.cohortDataModel.RetrieveCohortOverlapStats(sourceId, caseCohortId, controlCohortId,
filterConceptId, filterConceptValue, conceptIds)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"message": "Error retrieving stats", "error": err.Error()})
c.Abort()
return
}
c.JSON(http.StatusOK, gin.H{"cohort_overlap": breakdownStats})
return
}
breakdownStats, err := u.cohortDataModel.RetrieveCohortOverlapStats(sourceId, caseCohortId, controlCohortId,
filterConceptId, filterConceptValue, conceptIds)
if err != nil {
c.JSON(http.StatusInternalServerError, gin.H{"message": "Error retrieving stats", "error": err.Error()})
c.Abort()
return
}
c.JSON(http.StatusOK, gin.H{"cohort_overlap": breakdownStats})
}

0 comments on commit f4335dc

Please sign in to comment.