feat: add SMTP email support and fix profile/permissions bugs
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"encoding/json"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"github.com/go-chi/chi/v5"
|
||||
|
||||
"git.dustin.coffee/hobokenchicken/dumpsterChat/internal/middleware"
|
||||
webpush "github.com/SherClockHolmes/webpush-go"
|
||||
@@ -31,10 +32,10 @@ func NewHandler(db *sql.DB, vapidPub, vapidPriv, vapidSubj string, logger *slog.
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Handler) RegisterRoutes(r *http.ServeMux) {
|
||||
r.HandleFunc("POST /push/subscribe", h.Subscribe)
|
||||
r.HandleFunc("POST /push/unsubscribe", h.Unsubscribe)
|
||||
r.HandleFunc("GET /push/vapid-public-key", h.GetPublicKey)
|
||||
func (h *Handler) RegisterRoutes(r chi.Router) {
|
||||
r.Post("/push/subscribe", h.Subscribe)
|
||||
r.Post("/push/unsubscribe", h.Unsubscribe)
|
||||
r.Get("/push/vapid-public-key", h.GetPublicKey)
|
||||
}
|
||||
|
||||
// @Summary Get VAPID public key
|
||||
|
||||
Reference in New Issue
Block a user