comparison pkg/controllers/routes.go @ 1589:e0bd82f6ee14

Added PUT /api/imports/scheduler to add a import configuration.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 14 Dec 2018 11:29:28 +0100
parents caedd9b176f2
children 2fdd8e57542d
comparison
equal deleted inserted replaced
1588:2888bfacd331 1589:e0bd82f6ee14
176 })).Methods(http.MethodPost) 176 })).Methods(http.MethodPost)
177 177
178 // Import scheduler configuration 178 // Import scheduler configuration
179 api.Handle("/imports/scheduler", 179 api.Handle("/imports/scheduler",
180 waterwayAdmin(&JSONHandler{ 180 waterwayAdmin(&JSONHandler{
181 Input: func() interface{} { return new(models.ImportConfig) },
182 Handle: addSchedule,
183 })).Methods(http.MethodPost)
184
185 api.Handle("/imports/scheduler",
186 waterwayAdmin(&JSONHandler{
181 Handle: listScheduler, 187 Handle: listScheduler,
182 })).Methods(http.MethodGet) 188 })).Methods(http.MethodGet)
183 189
184 // Import queue 190 // Import queue
185 lsImports := waterwayAdmin(&JSONHandler{ 191 lsImports := waterwayAdmin(&JSONHandler{