aboutsummaryrefslogtreecommitdiff
path: root/cmd/monfront/main.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2018-12-14 19:52:21 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2018-12-14 19:52:21 +0100
commit887e8ea089970f7608349d80d7546cc5251469ba (patch)
tree69ed0c6a5a25c3207e36cbf04c4bf480de008fa6 /cmd/monfront/main.go
parent17457f0e533c7b68d4f2b113ab1a31a0eb23c8b0 (diff)
monfront - fix mute options
After the notifications were extracted the mute option didn't work anymore. With this fix, they are back to working.
Diffstat (limited to 'cmd/monfront/main.go')
-rw-r--r--cmd/monfront/main.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/monfront/main.go b/cmd/monfront/main.go
index b20688e..87ae717 100644
--- a/cmd/monfront/main.go
+++ b/cmd/monfront/main.go
@@ -98,9 +98,11 @@ func checkAction(w http.ResponseWriter, r *http.Request) {
setClause := ""
switch action[0] {
case "mute":
- setClause = "notify = false"
+ setTable = "checks_notify"
+ setClause = "enabled = false"
case "unmute":
- setClause = "notify = true"
+ setTable = "checks_notify"
+ setClause = "enabled = true"
case "enable":
setClause = "enabled = true"
case "disable":
@@ -137,7 +139,7 @@ func checkAction(w http.ResponseWriter, r *http.Request) {
return
}
whereColumn := "id"
- if setTable == "active_checks" {
+ if setTable == "active_checks" || setTable == "checks_notify" {
whereColumn = "check_id"
}