This is a significant overhaul to make it possible to serve totally different templates with different components for the different sites.
23 lines
418 B
Go
23 lines
418 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)
|
|
return r
|
|
}
|
|
|
|
func getRoot(w http.ResponseWriter, r *http.Request) {
|
|
htmlpage.RenderOrError(
|
|
w,
|
|
publicreports.Root,
|
|
publicreports.RootContext{},
|
|
)
|
|
}
|