Actually publish visit notification

This commit is contained in:
collin 2025-09-02 16:53:56 +02:00
parent f032c25ef7
commit 337d4cf9a1
No known key found for this signature in database

View file

@ -154,7 +154,10 @@ func SetupAuth() {
func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
fmt.Printf("%s - [%s] (%s) %s\n", time.Now().Format(time.RFC3339), r.RemoteAddr, r.Method, r.URL) fmt.Printf("%s - [%s] (%s) %s\n", time.Now().Format(time.RFC3339), r.RemoteAddr, r.Method, r.URL)
h.visits.HandleVisit(r.RemoteAddr) visit := h.visits.HandleVisit(r.RemoteAddr)
if visit != nil {
h.ntfy.PublishNewVisitNotification(visit)
}
switch true { switch true {
case r.Method == "GET" && r.URL.Path == "/favicon.ico": case r.Method == "GET" && r.URL.Path == "/favicon.ico":