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-02-09 22:35:12 +00:00
|
|
|
r.Get("/error", getError)
|
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)
|
2026-02-02 21:34:36 +00:00
|
|
|
r.Get("/email/confirm", getEmailConfirm)
|
|
|
|
|
r.Post("/email/confirm", postEmailConfirm)
|
|
|
|
|
r.Get("/email/confirm/complete", getEmailConfirmComplete)
|
|
|
|
|
r.Get("/email/unsubscribe", getEmailUnsubscribe)
|
|
|
|
|
r.Get("/email/unsubscribe/report/{report_id}", getEmailReportUnsubscribe)
|
2026-01-21 18:26:48 +00:00
|
|
|
r.Get("/image/{uuid}", getImageByUUID)
|
2026-03-03 17:08:58 +00:00
|
|
|
r.Get("/mailer/{public_id}", html.MakeGet(getMailer))
|
2026-03-04 00:22:46 +00:00
|
|
|
r.Post("/mailer/{public_id}/confirm", html.MakePost(postMailerConfirm))
|
2026-03-03 17:52:46 +00:00
|
|
|
r.Get("/mailer/{public_id}/contribute", html.MakeGet(getMailerContribute))
|
|
|
|
|
r.Get("/mailer/{public_id}/evidence", html.MakeGet(getMailerEvidence))
|
|
|
|
|
r.Get("/mailer/{public_id}/schedule", html.MakeGet(getMailerSchedule))
|
|
|
|
|
r.Get("/mailer/{public_id}/update", html.MakeGet(getMailerUpdate))
|
2026-01-09 19:43:19 +00:00
|
|
|
r.Post("/register-notifications", postRegisterNotifications)
|
|
|
|
|
r.Get("/register-notifications-complete", getRegisterNotificationsComplete)
|
2026-02-04 16:07:36 +00:00
|
|
|
r.Get("/report/suggest", getReportSuggestion)
|
2026-01-09 21:31:45 +00:00
|
|
|
r.Get("/search", getSearch)
|
2026-02-03 23:12:40 +00:00
|
|
|
r.Get("/scss/*", getScssDebug)
|
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
|
|
|
|
|
}
|