comparison pkg/controllers/routes.go @ 1469:286a3306f6bf bulkreview

Import bulk review: Cleaned up input JSON document handling. Added proper error handling.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 30 Nov 2018 09:15:47 +0100
parents 5e1218b5a123
children 702671b76eae
comparison
equal deleted inserted replaced
1468:5e1218b5a123 1469:286a3306f6bf
181 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ 181 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{
182 Handle: importLogs, 182 Handle: importLogs,
183 })).Methods(http.MethodGet) 183 })).Methods(http.MethodGet)
184 184
185 api.Handle("/imports", waterwayAdmin(&JSONHandler{ 185 api.Handle("/imports", waterwayAdmin(&JSONHandler{
186 Input: func() interface{} { return []*models.Review{} },
186 Handle: reviewImports, 187 Handle: reviewImports,
187 })).Methods(http.MethodPatch) 188 })).Methods(http.MethodPatch)
188 189
189 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ 190 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{
190 Handle: deleteImport, 191 Handle: deleteImport,