Add a resource for getting service requests
This commit is contained in:
parent
28ec1c3d67
commit
4a440e3022
18 changed files with 387 additions and 51 deletions
|
|
@ -47,11 +47,14 @@ func AddRoutes(r *mux.Router) {
|
|||
r.HandleFunc("/rmo/nuisance", handlerFormPost(nuisance.Create)).Methods("POST")
|
||||
water := resource.Water(router)
|
||||
r.HandleFunc("/rmo/water", handlerFormPost(water.Create)).Methods("POST")
|
||||
r.Handle("/service-request", auth.NewEnsureAuth(apiServiceRequest)).Methods("GET")
|
||||
service_request := resource.ServiceRequest(router)
|
||||
r.Handle("/service-request", authenticatedHandlerJSONSlice(service_request.List)).Methods("GET")
|
||||
session := resource.Session(router)
|
||||
r.Handle("/session", authenticatedHandlerJSON(session.Get)).Methods("GET").Name("session.get")
|
||||
signal := resource.Signal(r)
|
||||
r.Handle("/signal", authenticatedHandlerJSON(signal.List)).Methods("GET")
|
||||
sync := resource.Sync(r)
|
||||
r.Handle("/sync", authenticatedHandlerJSONSlice(sync.List)).Methods("GET")
|
||||
r.Handle("/sudo/email", authenticatedHandlerJSONPost(postSudoEmail)).Methods("POST")
|
||||
r.Handle("/sudo/sms", authenticatedHandlerJSONPost(postSudoSMS)).Methods("POST")
|
||||
r.Handle("/sudo/sse", authenticatedHandlerJSONPost(postSudoSSE)).Methods("POST")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue