2026-01-29 23:55:41 +00:00
|
|
|
package rmo
|
2026-01-09 19:43:19 +00:00
|
|
|
|
|
|
|
|
import (
|
2026-01-30 18:21:27 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/html"
|
2026-01-09 19:43:19 +00:00
|
|
|
"github.com/go-chi/chi/v5"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func Router() chi.Router {
|
|
|
|
|
r := chi.NewRouter()
|
|
|
|
|
r.Get("/", getRoot)
|
2026-01-30 20:41:02 +00:00
|
|
|
r.Get("/nuisance", getNuisance)
|
2026-01-30 22:07:20 +00:00
|
|
|
r.Post("/nuisance", postNuisance)
|
2026-01-31 16:44:41 +00:00
|
|
|
r.Get("/submit-complete", getSubmitComplete)
|
2026-02-01 03:24:50 +00:00
|
|
|
r.Get("/water", getWater)
|
2026-02-01 03:49:06 +00:00
|
|
|
r.Post("/water", postWater)
|
2026-02-01 02:57:58 +00:00
|
|
|
|
2026-02-02 14:23:22 +00:00
|
|
|
r.Get("/district", getDistrictList)
|
2026-02-01 02:57:58 +00:00
|
|
|
r.Get("/district/{slug}", getRootDistrict)
|
2026-02-01 03:14:36 +00:00
|
|
|
r.Get("/district/{slug}/nuisance", getNuisanceDistrict)
|
2026-01-30 20:41:02 +00:00
|
|
|
//r.Get("/district/{slug}/nuisance-submit-complete", renderMock(mockNuisanceSubmitCompleteT))
|
|
|
|
|
//r.Get("/district/{slug}/status", renderMock(mockStatusT))
|
2026-02-01 03:24:50 +00:00
|
|
|
r.Get("/district/{slug}/water", getWaterDistrict)
|
2026-02-01 03:49:06 +00:00
|
|
|
//r.Post("/district/{slug}/water", postWaterDistrict)
|
2026-01-30 20:41:02 +00:00
|
|
|
|
2026-01-20 17:10:22 +00:00
|
|
|
r.Get("/privacy", getPrivacy)
|
2026-01-19 21:33:26 +00:00
|
|
|
r.Get("/robots.txt", getRobots)
|
2026-02-02 19:54:32 +00:00
|
|
|
r.Get("/email/render/{code}", getEmailByCode)
|
|
|
|
|
r.Get("/email/subscribe", getEmailSubscribe)
|
2026-01-21 18:26:48 +00:00
|
|
|
r.Get("/image/{uuid}", getImageByUUID)
|
2026-01-24 18:45:11 +00:00
|
|
|
r.Route("/mock", addMockRoutes)
|
2026-01-09 19:43:19 +00:00
|
|
|
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)
|
2026-01-09 21:31:45 +00:00
|
|
|
r.Get("/search", getSearch)
|
2026-01-09 19:43:19 +00:00
|
|
|
r.Get("/status", getStatus)
|
2026-01-09 20:08:29 +00:00
|
|
|
r.Get("/status/{report_id}", getStatusByID)
|
2026-01-20 17:10:22 +00:00
|
|
|
r.Get("/terms-of-service", getTerms)
|
2026-01-30 18:21:27 +00:00
|
|
|
html.AddStaticRoute(r, "/static")
|
2026-01-09 19:43:19 +00:00
|
|
|
return r
|
|
|
|
|
}
|