2026-01-29 23:55:41 +00:00
|
|
|
package rmo
|
2026-01-09 19:43:19 +00:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"net/http"
|
|
|
|
|
|
2026-01-30 18:21:27 +00:00
|
|
|
"github.com/Gleipnir-Technology/nidus-sync/html"
|
2026-01-09 19:43:19 +00:00
|
|
|
)
|
|
|
|
|
|
2026-03-09 18:02:22 +00:00
|
|
|
type ContentWater struct {
|
|
|
|
|
District *ContentDistrict
|
|
|
|
|
URL ContentURL
|
2026-01-09 19:43:19 +00:00
|
|
|
}
|
|
|
|
|
|
2026-02-01 03:24:50 +00:00
|
|
|
func getWater(w http.ResponseWriter, r *http.Request) {
|
2026-01-30 18:21:27 +00:00
|
|
|
html.RenderOrError(
|
2026-01-09 19:43:19 +00:00
|
|
|
w,
|
2026-02-07 05:51:21 +00:00
|
|
|
"rmo/water.html",
|
2026-03-09 18:02:22 +00:00
|
|
|
ContentWater{
|
|
|
|
|
District: nil,
|
|
|
|
|
URL: makeContentURL(nil),
|
2026-02-01 03:24:50 +00:00
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
func getWaterDistrict(w http.ResponseWriter, r *http.Request) {
|
|
|
|
|
district, err := districtBySlug(r)
|
|
|
|
|
if err != nil {
|
|
|
|
|
respondError(w, "Failed to lookup organization", err, http.StatusBadRequest)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
html.RenderOrError(
|
|
|
|
|
w,
|
2026-02-07 05:51:21 +00:00
|
|
|
"rmo/water.html",
|
2026-03-09 18:02:22 +00:00
|
|
|
ContentWater{
|
|
|
|
|
District: newContentDistrict(district),
|
|
|
|
|
URL: makeContentURL(district),
|
2026-01-09 19:43:19 +00:00
|
|
|
},
|
|
|
|
|
)
|
|
|
|
|
}
|