Split public report URIs by type

This allows us to have different signatures for the different types
This commit is contained in:
Eli Ribble 2026-04-12 17:01:30 +00:00
parent 875298fe88
commit a3c340f787
No known key found for this signature in database
7 changed files with 49 additions and 53 deletions

View file

@ -84,6 +84,10 @@ func AddRoutes(r *mux.Router) {
r.Handle("/publicreport/{id}", handlerJSON(publicreport.ByID)).Methods("GET").Name("publicreport.ByIDGet")
r.Handle("/publicreport/{id}", handlerJSONPut(publicreport.Update)).Methods("PUT")
r.Handle("/publicreport/{id}/image", handlerFormPost(publicreport.ImageCreate)).Methods("POST")
r.Handle("/publicreport/compliance/{id}", handlerJSON(publicreport.ByIDCompliance)).Methods("GET").Name("publicreport.compliance.ByIDGet")
r.Handle("/publicreport/nuisance/{id}", handlerJSON(publicreport.ByIDNuisance)).Methods("GET").Name("publicreport.nuisance.ByIDGet")
r.Handle("/publicreport/water/{id}", handlerJSON(publicreport.ByIDWater)).Methods("GET").Name("publicreport.water.ByIDGet")
publicreport_notification := resource.PublicreportNotification(router)
r.Handle("/publicreport-notification", handlerJSONPost(publicreport_notification.Create)).Methods("POST")