Replace Web Push and its service worker with page notifications over SSE

This commit is contained in:
Ian Gulliver
2026-10-15 18:34:53 -07:00
parent c7f19f2537
commit a1615693ef
32 changed files with 429 additions and 1175 deletions
+21
View File
@@ -0,0 +1,21 @@
package server
import (
"net/http"
"g.fc.run/misc/byre/internal/api"
)
func (s *Server) UpdateNotificationPrefs(w http.ResponseWriter, r *http.Request) {
req := api.NotificationPrefs{}
if !readJSON(w, r, &req) {
return
}
u, err := s.store.UpdateNotificationPrefs(r.Context(), actor(r), req)
if err != nil {
writeStoreError(w, err)
return
}
writeJSON(w, http.StatusOK, u)
}