2026-04-08 12:49:27 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func (h *Handler) RegisterRoutes(mux *http.ServeMux) {
|
|
|
|
|
mux.HandleFunc("/api/v1/auth/public-key", h.GetPublicKey)
|
|
|
|
|
mux.HandleFunc("/api/v1/auth/register", h.RegisterCert)
|
|
|
|
|
mux.HandleFunc("/api/v1/facturas", h.HandleFacturas)
|
|
|
|
|
mux.HandleFunc("/api/v1/facturas/anular", h.HandleFacturasAnular)
|
2026-05-17 20:27:33 +00:00
|
|
|
mux.HandleFunc("/api/v1/formats", h.ListFormats)
|
2026-04-08 12:49:27 +00:00
|
|
|
mux.HandleFunc("/api/v1/health", h.HealthCheck)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (h *Handler) HealthCheck(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
w.Header().Set("Content-Type", "application/json")
|
|
|
|
|
w.Write([]byte(`{"status":"ok"}`))
|
|
|
|
|
}
|