Chore: replace macaron with web package (#40136)
* replace macaron with web package * add web.go
This commit is contained in:
+4
-4
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/services/search"
|
||||
"github.com/grafana/grafana/pkg/setting"
|
||||
"github.com/grafana/grafana/pkg/util"
|
||||
macaron "gopkg.in/macaron.v1"
|
||||
"github.com/grafana/grafana/pkg/web"
|
||||
)
|
||||
|
||||
func ValidateOrgAlert(c *models.ReqContext) {
|
||||
@@ -258,7 +258,7 @@ func GetAlertNotificationByID(c *models.ReqContext) response.Response {
|
||||
func GetAlertNotificationByUID(c *models.ReqContext) response.Response {
|
||||
query := &models.GetAlertNotificationsWithUidQuery{
|
||||
OrgId: c.OrgId,
|
||||
Uid: macaron.Params(c.Req)[":uid"],
|
||||
Uid: web.Params(c.Req)[":uid"],
|
||||
}
|
||||
|
||||
if query.Uid == "" {
|
||||
@@ -318,7 +318,7 @@ func (hs *HTTPServer) UpdateAlertNotification(c *models.ReqContext, cmd models.U
|
||||
|
||||
func (hs *HTTPServer) UpdateAlertNotificationByUID(c *models.ReqContext, cmd models.UpdateAlertNotificationWithUidCommand) response.Response {
|
||||
cmd.OrgId = c.OrgId
|
||||
cmd.Uid = macaron.Params(c.Req)[":uid"]
|
||||
cmd.Uid = web.Params(c.Req)[":uid"]
|
||||
|
||||
err := hs.fillWithSecureSettingsDataByUID(c.Req.Context(), &cmd)
|
||||
if err != nil {
|
||||
@@ -419,7 +419,7 @@ func DeleteAlertNotification(c *models.ReqContext) response.Response {
|
||||
func DeleteAlertNotificationByUID(c *models.ReqContext) response.Response {
|
||||
cmd := models.DeleteAlertNotificationWithUidCommand{
|
||||
OrgId: c.OrgId,
|
||||
Uid: macaron.Params(c.Req)[":uid"],
|
||||
Uid: web.Params(c.Req)[":uid"],
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user