Updating status code in filters response (#24)

* TP-0000 | shifting readiness controller at top

* TP-0000 | refactoring status code in resposne
This commit is contained in:
Shubham Kirve
2023-04-21 14:40:00 +05:30
committed by GitHub Enterprise
parent 0928515d49
commit 55944901e0
2 changed files with 3 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ func (f *filterService) GetFilters(c *gin.Context) {
filterResponses = append(filterResponses, *incidentStatusFilterData, *severityFilterData, *teamFilterData)
c.JSON(http.StatusBadRequest, common.SuccessResponse(filterResponses, http.StatusOK))
c.JSON(http.StatusOK, common.SuccessResponse(filterResponses, http.StatusOK))
}
func (f *filterService) GetEntityRepositories() (

View File

@@ -111,12 +111,12 @@ func (i *incidentService) GetIncidents(c *gin.Context) {
TotalElements: totalElements,
}
c.JSON(http.StatusMultiStatus, common.SuccessPaginatedResponse(incidentResponses, common.Page {
c.JSON(http.StatusOK, common.SuccessPaginatedResponse(incidentResponses, common.Page {
PageSize: page.PageSize,
TotalPages: int64(math.Ceil(float64(page.TotalElements) / float64(pageSize))),
PageNumber: pageNumber,
TotalElements: page.TotalElements,
}, http.StatusMultiStatus))
}, http.StatusOK))
}
func (i *incidentService) GetIncidentResponseFromIncidentEntity(