Alerting: Fix API specification (#38753)

* Alerting: Fix API spec

* Add missing status codes
This commit is contained in:
Sofia Papagiannaki
2021-09-10 12:46:02 +03:00
committed by GitHub
parent 9173898fd6
commit 7af329f385
7 changed files with 148 additions and 206 deletions

View File

@@ -15,7 +15,6 @@ import (
"github.com/grafana/grafana/pkg/services/ngalert/eval"
"github.com/grafana/grafana/pkg/setting"
"github.com/grafana/grafana/pkg/tsdb"
"github.com/grafana/grafana/pkg/util"
)
type TestingApiSrv struct {
@@ -26,11 +25,6 @@ type TestingApiSrv struct {
log log.Logger
}
func (srv TestingApiSrv) RouteTestReceiverConfig(c *models.ReqContext, body apimodels.ExtendedReceiver) response.Response {
srv.log.Info("RouteTestReceiverConfig: ", "body", body)
return response.JSON(http.StatusOK, util.DynMap{"message": "success"})
}
func (srv TestingApiSrv) RouteTestRuleConfig(c *models.ReqContext, body apimodels.TestRulePayload) response.Response {
recipient := c.Params("Recipient")
if recipient == apimodels.GrafanaBackend.String() {