comparison pkg/controllers/routes.go @ 1591:2d53065c95af

Added GET /imports/scheduler/{id:[0-9]+} to show infos about single import configuration.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 14 Dec 2018 12:49:44 +0100
parents 2fdd8e57542d
children c12cec1d7692
comparison
equal deleted inserted replaced
1590:2fdd8e57542d 1591:2d53065c95af
179 api.Handle("/imports/scheduler/{id:[0-9]+}", 179 api.Handle("/imports/scheduler/{id:[0-9]+}",
180 waterwayAdmin(&JSONHandler{ 180 waterwayAdmin(&JSONHandler{
181 Handle: deleteSchedule, 181 Handle: deleteSchedule,
182 })).Methods(http.MethodDelete) 182 })).Methods(http.MethodDelete)
183 183
184 api.Handle("/imports/scheduler/{id:[0-9]+}",
185 waterwayAdmin(&JSONHandler{
186 Handle: infoSchedule,
187 })).Methods(http.MethodGet)
188
184 api.Handle("/imports/scheduler", 189 api.Handle("/imports/scheduler",
185 waterwayAdmin(&JSONHandler{ 190 waterwayAdmin(&JSONHandler{
186 Input: func() interface{} { return new(models.ImportConfig) }, 191 Input: func() interface{} { return new(models.ImportConfig) },
187 Handle: addSchedule, 192 Handle: addSchedule,
188 })).Methods(http.MethodPost) 193 })).Methods(http.MethodPost)