fixed some migration issues and added generics for update and insert

This commit is contained in:
2026-02-09 21:58:50 +11:00
parent 292ec93de7
commit bb52790faa
19 changed files with 591 additions and 261 deletions

View File

@@ -3,6 +3,7 @@ package notify
import (
"net/http"
"time"
"git.haelnorr.com/h/golib/hws"
"git.haelnorr.com/h/golib/notify"
@@ -61,3 +62,11 @@ func Info(s *hws.Server, w http.ResponseWriter, r *http.Request, title, msg stri
func Success(s *hws.Server, w http.ResponseWriter, r *http.Request, title, msg string, action any) {
notifyClient(s, w, r, notify.LevelSuccess, title, msg, "", action)
}
// SuccessWithDelay notifies with success level and a short delay to account for redirects
func SuccessWithDelay(s *hws.Server, w http.ResponseWriter, r *http.Request, title, msg string, action any) {
go func() {
<-time.Tick(1 * time.Second)
notifyClient(s, w, r, notify.LevelSuccess, title, msg, "", action)
}()
}