comparison pkg/controllers/routes.go @ 1315:24e4c60c2606

Simplified and fixed filtering of import queue listing.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 23 Nov 2018 19:41:31 +0100
parents 17131f0f9fcb
children 5e1218b5a123
comparison
equal deleted inserted replaced
1314:97d9e689520b 1315:24e4c60c2606
174 lsImports := waterwayAdmin(&JSONHandler{ 174 lsImports := waterwayAdmin(&JSONHandler{
175 Handle: listImports, 175 Handle: listImports,
176 }) 176 })
177 177
178 api.Handle("/imports", lsImports). 178 api.Handle("/imports", lsImports).
179 Methods(http.MethodGet). 179 Methods(http.MethodGet)
180 Queries(
181 "offset", "{offset:[0-9]+}",
182 "limit", "{limit:[0-9]+}",
183 "states", "",
184 "kinds", "")
185
186 api.Handle("/imports", lsImports).Methods(http.MethodGet)
187 180
188 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ 181 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{
189 Handle: importLogs, 182 Handle: importLogs,
190 })).Methods(http.MethodGet) 183 })).Methods(http.MethodGet)
191 184