Mercurial > gemma
diff pkg/controllers/routes.go @ 1037:a04126989d91
Added endpoint to delete job from import queue.
This has no effect on running jobs.
DELETE path: /api/imports/[0-9]+
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 24 Oct 2018 16:21:44 +0200 |
parents | 3de54d7b7d30 |
children | 146245d2198f |
line wrap: on
line diff
--- a/pkg/controllers/routes.go Wed Oct 24 16:07:52 2018 +0200 +++ b/pkg/controllers/routes.go Wed Oct 24 16:21:44 2018 +0200 @@ -169,13 +169,15 @@ "offset", "{offset:[0-9]+}", "limit", "{limit:[0-9]+}") - api.Handle("/imports", lsImports). - Methods(http.MethodGet) + api.Handle("/imports", lsImports).Methods(http.MethodGet) api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ Handle: importLogs, - })). - Methods(http.MethodGet) + })).Methods(http.MethodGet) + + api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ + Handle: deleteImport, + })).Methods(http.MethodDelete) // Token handling: Login/Logout. api.HandleFunc("/login", login).