mirror of
https://github.com/rjNemo/payit
synced 2026-06-06 02:16:40 +00:00
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.
11 lines
290 B
Go
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))))
|
|
}
|