🐛 Fixes server requests
This commit is contained in:
@@ -79,7 +79,9 @@ func setOpened(c echo.Context) error {
|
||||
go sendAlert(action)
|
||||
}
|
||||
|
||||
openedChange <- 0
|
||||
go func() {
|
||||
openedChange <- 0
|
||||
}()
|
||||
mut.Unlock()
|
||||
return c.NoContent(http.StatusOK)
|
||||
}
|
||||
@@ -126,6 +128,7 @@ func setAlerts(c echo.Context) error {
|
||||
}
|
||||
|
||||
if data.For > 0 {
|
||||
log.Infof("pausing alerts for %d seconds", data.For)
|
||||
go func() {
|
||||
time.Sleep(time.Duration(data.For) * time.Second)
|
||||
|
||||
|
Reference in New Issue
Block a user