1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-09-24 12:30:27 +02:00

Add "nowebpush" build tag

This commit is contained in:
binwiederhier 2025-08-07 17:39:25 +02:00
parent 99a2ca8802
commit d9ab7cc78d
3 changed files with 26 additions and 1 deletions

View file

@ -1,4 +1,4 @@
//go:build !noserver
//go:build !noserver && !nowebpush
package cmd

View file

@ -1,3 +1,5 @@
//go:build !nowebpush
package server
import (

View file

@ -0,0 +1,23 @@
//go:build nowebpush
package server
import (
"net/http"
)
func (s *Server) handleWebPushUpdate(w http.ResponseWriter, r *http.Request, v *visitor) error {
return errHTTPNotFound
}
func (s *Server) handleWebPushDelete(w http.ResponseWriter, r *http.Request, _ *visitor) error {
return errHTTPNotFound
}
func (s *Server) publishToWebPushEndpoints(v *visitor, m *message) {
// Nothing to see here
}
func (s *Server) pruneAndNotifyWebPushSubscriptions() {
// Nothing to see here
}