mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-21 06:45:26 -06: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
|
package cmd
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
//go:build !nowebpush
|
||||||
|
|
||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
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