Also start the pattern of breaking out pool pages together in their own file. I think its easier to read this way.
28 lines
856 B
Go
28 lines
856 B
Go
package publicreport
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/htmlpage"
|
|
"github.com/go-chi/chi/v5"
|
|
)
|
|
|
|
func Router() chi.Router {
|
|
r := chi.NewRouter()
|
|
r.Get("/", getRoot)
|
|
r.Get("/nuisance", getNuisance)
|
|
r.Post("/nuisance-submit", postNuisance)
|
|
r.Get("/nuisance-submit-complete", getNuisanceSubmitComplete)
|
|
r.Get("/pool", getPool)
|
|
r.Post("/pool-submit", postPool)
|
|
r.Get("/pool-submit-complete", getPoolSubmitComplete)
|
|
r.Get("/quick", getQuick)
|
|
r.Post("/quick-submit", postQuick)
|
|
r.Get("/quick-submit-complete", getQuickSubmitComplete)
|
|
r.Post("/register-notifications", postRegisterNotifications)
|
|
r.Get("/register-notifications-complete", getRegisterNotificationsComplete)
|
|
r.Get("/status", getStatus)
|
|
localFS := http.Dir("./static")
|
|
htmlpage.FileServer(r, "/static", localFS, EmbeddedStaticFS, "static")
|
|
return r
|
|
}
|