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:
parent
99a2ca8802
commit
d9ab7cc78d
3 changed files with 26 additions and 1 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue