mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-01-18 16:17:26 +01:00
Add "nowebpush" build tag
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//go:build !noserver
|
||||
//go:build !noserver && !nowebpush
|
||||
|
||||
package cmd
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
//go:build !nowebpush
|
||||
|
||||
package server
|
||||
|
||||
import (
|
||||
|
||||
23
server/server_webpush_dummy.go
Normal file
23
server/server_webpush_dummy.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user