Add district resource and an API to RMO

We're going to need an API for the single-page frontend
This commit is contained in:
Eli Ribble 2026-04-03 18:17:19 +00:00
parent 4f9617aa2f
commit bfecae7d61
No known key found for this signature in database
9 changed files with 114 additions and 16 deletions

View file

@ -66,8 +66,10 @@ func AddRoutes(r *mux.Router) {
r.Handle("/user/{id}", authenticatedHandlerJSONPut(user.ByIDPut)).Methods("PUT")
// Unauthenticated endpoints
r.HandleFunc("/district", apiGetDistrict).Methods("GET")
r.HandleFunc("/district/{slug}/logo", apiGetDistrictLogo).Methods("GET")
district := resource.District(router)
r.Handle("/district", handlerJSONSlice(district.List)).Methods("GET")
//r.HandleFunc("/district", apiGetDistrict).Methods("GET")
r.HandleFunc("/district/{slug}/logo", apiGetDistrictLogo).Methods("GET").Name("district.logo.BySlug")
r.HandleFunc("/compliance-request/image/pool/{public_id}", getComplianceRequestImagePool).Methods("GET")
r.HandleFunc("/twilio/call", twilioCallPost).Methods("POST")
r.HandleFunc("/twilio/call/status", twilioCallStatusPost).Methods("POST")