forked from ebhomengo/niki
18 lines
370 B
Go
18 lines
370 B
Go
package analytic
|
|
|
|
import "net/http"
|
|
|
|
func NewRouter(h *Handler) http.Handler {
|
|
mux := http.NewServeMux()
|
|
|
|
// Define Routes
|
|
v1 := http.NewServeMux()
|
|
v1.HandleFunc("GET /health", h.Health)
|
|
v1.HandleFunc("GET /patients", h.PatientsAnalytic)
|
|
v1.HandleFunc("GET /patients-summary", h.PatientsMapSummary)
|
|
|
|
mux.Handle("/v1/", http.StripPrefix("/v1", v1))
|
|
|
|
return mux
|
|
}
|