fix status code 200 (#47818)

This commit is contained in:
ying-jeanne
2022-04-15 08:01:58 -04:00
committed by GitHub
parent f263cad8ab
commit 7ddae870e7
44 changed files with 166 additions and 152 deletions
+2 -2
View File
@@ -23,7 +23,7 @@ func (hs *HTTPServer) commentsGet(c *models.ReqContext) response.Response {
}
return response.Error(http.StatusInternalServerError, "internal error", err)
}
return response.JSON(200, util.DynMap{
return response.JSON(http.StatusOK, util.DynMap{
"comments": items,
})
}
@@ -43,7 +43,7 @@ func (hs *HTTPServer) commentsCreate(c *models.ReqContext) response.Response {
}
return response.Error(http.StatusInternalServerError, "internal error", err)
}
return response.JSON(200, util.DynMap{
return response.JSON(http.StatusOK, util.DynMap{
"comment": comment,
})
}