Add simple compliance landing page
This commit is contained in:
parent
4b87c74f41
commit
457f123f69
4 changed files with 181 additions and 23 deletions
23
rmo/compliance.go
Normal file
23
rmo/compliance.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package rmo
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/Gleipnir-Technology/nidus-sync/html"
|
||||
)
|
||||
|
||||
func getDistrictCompliance(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,
|
||||
"rmo/district-compliance.html",
|
||||
ContentNuisance{
|
||||
District: newContentDistrict(district),
|
||||
URL: makeContentURL(nil),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
@ -16,6 +16,7 @@ func Router(r *mux.Router) {
|
|||
|
||||
r.HandleFunc("/district", getDistrictList).Methods("GET")
|
||||
r.HandleFunc("/district/{slug}", getRootDistrict).Methods("GET")
|
||||
r.HandleFunc("/district/{slug}/compliance", getDistrictCompliance).Methods("GET")
|
||||
r.HandleFunc("/district/{slug}/nuisance", getNuisanceDistrict).Methods("GET")
|
||||
//r.HandleFunc("/district/{slug}/nuisance-submit-complete", renderMock(mockNuisanceSubmitCompleteT)).Methods("GET")
|
||||
//r.HandleFunc("/district/{slug}/status", renderMock(mockStatusT)).Methods("GET")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue