payit/internal/web/routes.go
Ruidy bf721dc130
feat(web): add logging middleware and refactor handlers
Introduced LoggerMiddleware for HTTP request logging. Refactored handler
methods to return http.HandlerFunc for improved composability. Updated
route registration and tests to use new handler signatures.
2025-09-28 19:43:30 +02:00

11 lines
290 B
Go

package web
import (
"net/http"
)
func (h *Handler) registerRoutes(mux *http.ServeMux) {
mux.Handle("POST /api/checkout", h.createCheckoutSession())
mux.Handle("GET /", h.renderCheckoutPage())
mux.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.FS(h.fs))))
}