fix status code 200 (#47818)
This commit is contained in:
+4
-4
@@ -54,7 +54,7 @@ func (hs *HTTPServer) GetOrgByName(c *models.ReqContext) response.Response {
|
||||
},
|
||||
}
|
||||
|
||||
return response.JSON(200, &result)
|
||||
return response.JSON(http.StatusOK, &result)
|
||||
}
|
||||
|
||||
func (hs *HTTPServer) getOrgHelper(ctx context.Context, orgID int64) response.Response {
|
||||
@@ -81,7 +81,7 @@ func (hs *HTTPServer) getOrgHelper(ctx context.Context, orgID int64) response.Re
|
||||
},
|
||||
}
|
||||
|
||||
return response.JSON(200, &result)
|
||||
return response.JSON(http.StatusOK, &result)
|
||||
}
|
||||
|
||||
// POST /api/orgs
|
||||
@@ -105,7 +105,7 @@ func (hs *HTTPServer) CreateOrg(c *models.ReqContext) response.Response {
|
||||
|
||||
metrics.MApiOrgCreate.Inc()
|
||||
|
||||
return response.JSON(200, &util.DynMap{
|
||||
return response.JSON(http.StatusOK, &util.DynMap{
|
||||
"orgId": cmd.Result.Id,
|
||||
"message": "Organization created",
|
||||
})
|
||||
@@ -226,5 +226,5 @@ func (hs *HTTPServer) SearchOrgs(c *models.ReqContext) response.Response {
|
||||
return response.Error(500, "Failed to search orgs", err)
|
||||
}
|
||||
|
||||
return response.JSON(200, query.Result)
|
||||
return response.JSON(http.StatusOK, query.Result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user