POST routes to PUT routes (#48828)

This commit is contained in:
Alexander Weaver
2022-05-06 14:33:30 -05:00
committed by GitHub
parent bb66c03f9a
commit 809aa38103
9 changed files with 48 additions and 46 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ func (srv *ProvisioningSrv) RouteGetPolicyTree(c *models.ReqContext) response.Re
return response.JSON(http.StatusOK, policies)
}
func (srv *ProvisioningSrv) RoutePostPolicyTree(c *models.ReqContext, tree apimodels.Route) response.Response {
func (srv *ProvisioningSrv) RoutePutPolicyTree(c *models.ReqContext, tree apimodels.Route) response.Response {
err := srv.policies.UpdatePolicyTree(c.Req.Context(), c.OrgId, tree, alerting_models.ProvenanceAPI)
if errors.Is(err, store.ErrNoAlertmanagerConfiguration) {
return ErrResp(http.StatusNotFound, err, "")