🐛 Fixes server requests
All checks were successful
Gitea Build Action / build-go (push) Successful in 27s
Gitea Build Action / build-nuxt (push) Successful in 10m40s

This commit is contained in:
Daniel Svitan
2025-06-07 15:49:34 +02:00
parent cf35326bf2
commit 53722bdf18
4 changed files with 25 additions and 18 deletions

View File

@@ -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)