monfront - fix mute options
After the notifications were extracted the mute option didn't work anymore. With this fix, they are back to working.
This commit is contained in:
parent
17457f0e53
commit
887e8ea089
@ -98,9 +98,11 @@ func checkAction(w http.ResponseWriter, r *http.Request) {
|
|||||||
setClause := ""
|
setClause := ""
|
||||||
switch action[0] {
|
switch action[0] {
|
||||||
case "mute":
|
case "mute":
|
||||||
setClause = "notify = false"
|
setTable = "checks_notify"
|
||||||
|
setClause = "enabled = false"
|
||||||
case "unmute":
|
case "unmute":
|
||||||
setClause = "notify = true"
|
setTable = "checks_notify"
|
||||||
|
setClause = "enabled = true"
|
||||||
case "enable":
|
case "enable":
|
||||||
setClause = "enabled = true"
|
setClause = "enabled = true"
|
||||||
case "disable":
|
case "disable":
|
||||||
@ -137,7 +139,7 @@ func checkAction(w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
whereColumn := "id"
|
whereColumn := "id"
|
||||||
if setTable == "active_checks" {
|
if setTable == "active_checks" || setTable == "checks_notify" {
|
||||||
whereColumn = "check_id"
|
whereColumn = "check_id"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user