fixed some migration issues and added generics for update and insert
This commit is contained in:
@@ -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)
|
||||
}()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user