nidus-sync/report/endpoint.go
Eli Ribble 9774452821 Switch main report page to better example
This is still pulling from our generic district mock, but it's still
better than what we had. This also includes adding static content
hosting for the bootstrap content on the public domain.
2026-01-07 20:47:55 +00:00

25 lines
537 B
Go

package report
import (
"net/http"
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
"github.com/Gleipnir-Technology/nidus-sync/htmlpage/public-reports"
"github.com/go-chi/chi/v5"
)
func Router() chi.Router {
r := chi.NewRouter()
r.Get("/", getRoot)
localFS := http.Dir("./static")
htmlpage.FileServer(r, "/static", localFS, publicreports.EmbeddedStaticFS, "static")
return r
}
func getRoot(w http.ResponseWriter, r *http.Request) {
htmlpage.RenderOrError(
w,
publicreports.Root,
publicreports.RootContext{},
)
}