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:
committed by
GitHub Enterprise
parent
0928515d49
commit
55944901e0
@@ -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() (
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user