Mercurial > gemma
diff 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 |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Fri Dec 14 11:24:50 2018 +0100 +++ b/pkg/controllers/routes.go Fri Dec 14 11:29:28 2018 +0100 @@ -178,6 +178,12 @@ // Import scheduler configuration api.Handle("/imports/scheduler", waterwayAdmin(&JSONHandler{ + Input: func() interface{} { return new(models.ImportConfig) }, + Handle: addSchedule, + })).Methods(http.MethodPost) + + api.Handle("/imports/scheduler", + waterwayAdmin(&JSONHandler{ Handle: listScheduler, })).Methods(http.MethodGet)