feat(webhook): add webhook client for RSVP and photo uploads

This commit is contained in:
2026-08-12 20:27:42 +02:00
parent df5d8efeb1
commit d8f70cf731
5 changed files with 136 additions and 6 deletions
+3 -1
View File
@@ -14,6 +14,7 @@ import (
"wedding-server/internal/config"
"wedding-server/internal/mail"
"wedding-server/internal/store"
"wedding-server/internal/webhook"
)
//go:embed all:web/dist
@@ -37,9 +38,10 @@ func main() {
defer st.Close()
mailer := mail.New(cfg.Email)
wh := webhook.New(cfg.Webhook)
mux := http.NewServeMux()
api.New(cfg, st, mailer).Routes(mux)
api.New(cfg, st, mailer, wh).Routes(mux)
uploadsDir := filepath.Join(cfg.Storage.DataDir, "photos")
mux.Handle("/uploads/", http.StripPrefix("/uploads/", http.FileServer(http.Dir(uploadsDir))))