mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(alerting): pause dto can only pause one
This commit is contained in:
@@ -259,11 +259,10 @@ func NotificationTest(c *middleware.Context, dto dtos.NotificationTestCommand) R
|
||||
|
||||
//POST /api/alerts/:alertId/pause
|
||||
func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
|
||||
alertId := c.ParamsInt64("alertId")
|
||||
cmd := models.PauseAlertCommand{
|
||||
OrgId: c.OrgId,
|
||||
AlertIds: []int64{alertId},
|
||||
Paused: dto.Paused,
|
||||
OrgId: c.OrgId,
|
||||
AlertId: c.ParamsInt64("alertId"),
|
||||
Paused: dto.Paused,
|
||||
}
|
||||
|
||||
if err := bus.Dispatch(&cmd); err != nil {
|
||||
@@ -278,7 +277,7 @@ func PauseAlert(c *middleware.Context, dto dtos.PauseAlertCommand) Response {
|
||||
}
|
||||
|
||||
result := map[string]interface{}{
|
||||
"alertId": alertId,
|
||||
"alertId": c.ParamsInt64("alertId"),
|
||||
"state": response,
|
||||
"message": "alert " + pausedState,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user