comparison pkg/controllers/routes.go @ 5321:0919946f624b extented-report

Added a report controller.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 27 May 2021 01:22:10 +0200
parents 6ba7e6ac0882
children 348d91848278 96ceb150ea46
comparison
equal deleted inserted replaced
5320:866eae1bd888 5321:0919946f624b
320 waterwayAdmin(&mw.JSONHandler{ 320 waterwayAdmin(&mw.JSONHandler{
321 Handle: reviewImport, 321 Handle: reviewImport,
322 NoConn: true, 322 NoConn: true,
323 })).Methods(http.MethodPut) 323 })).Methods(http.MethodPut)
324 324
325 // Handler for reporting
326
327 api.Handle("/data/report/{name:[a-zA-Z0-9_]+}", waterwayAdmin(
328 mw.DBConn(http.HandlerFunc(report)))).Methods(http.MethodGet)
329
325 // Handler to serve data to the client. 330 // Handler to serve data to the client.
326 331
327 api.Handle("/data/{type:availability|fairway}/{kind:stretch|section|bottleneck}/{name:.+}", any( 332 api.Handle("/data/{type:availability|fairway}/{kind:stretch|section|bottleneck}/{name:.+}", any(
328 mw.DBConn(http.HandlerFunc(fairwayAvailability)))).Methods(http.MethodGet) 333 mw.DBConn(http.HandlerFunc(fairwayAvailability)))).Methods(http.MethodGet)
329 334