Mercurial > gemma
comparison pkg/controllers/routes.go @ 4790:6f3730196ebb
endpoint routing: get rid of unnecessary local variable.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Fri, 25 Oct 2019 11:13:31 +0200 |
parents | b1428b44e43f |
children | 1fef4679b07a |
comparison
equal
deleted
inserted
replaced
4788:9e077ca97505 | 4790:6f3730196ebb |
---|---|
283 waterwayAdmin(&mw.JSONHandler{ | 283 waterwayAdmin(&mw.JSONHandler{ |
284 Handle: listImportConfigs, | 284 Handle: listImportConfigs, |
285 })).Methods(http.MethodGet) | 285 })).Methods(http.MethodGet) |
286 | 286 |
287 // Import queue | 287 // Import queue |
288 lsImports := waterwayAdmin(&mw.JSONHandler{ | 288 |
289 api.Handle("/imports", waterwayAdmin(&mw.JSONHandler{ | |
289 Handle: listImports, | 290 Handle: listImports, |
290 }) | 291 })).Methods(http.MethodGet) |
291 | |
292 api.Handle("/imports", lsImports). | |
293 Methods(http.MethodGet) | |
294 | 292 |
295 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&mw.JSONHandler{ | 293 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&mw.JSONHandler{ |
296 Handle: importLogs, | 294 Handle: importLogs, |
297 })).Methods(http.MethodGet) | 295 })).Methods(http.MethodGet) |
298 | 296 |