Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
1036:ae2e716b85d2 | 1037:a04126989d91 |
---|---|
167 Methods(http.MethodGet). | 167 Methods(http.MethodGet). |
168 Queries( | 168 Queries( |
169 "offset", "{offset:[0-9]+}", | 169 "offset", "{offset:[0-9]+}", |
170 "limit", "{limit:[0-9]+}") | 170 "limit", "{limit:[0-9]+}") |
171 | 171 |
172 api.Handle("/imports", lsImports). | 172 api.Handle("/imports", lsImports).Methods(http.MethodGet) |
173 Methods(http.MethodGet) | |
174 | 173 |
175 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ | 174 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ |
176 Handle: importLogs, | 175 Handle: importLogs, |
177 })). | 176 })).Methods(http.MethodGet) |
178 Methods(http.MethodGet) | 177 |
178 api.Handle("/imports/{id:[0-9]+}", waterwayAdmin(&JSONHandler{ | |
179 Handle: deleteImport, | |
180 })).Methods(http.MethodDelete) | |
179 | 181 |
180 // Token handling: Login/Logout. | 182 // Token handling: Login/Logout. |
181 api.HandleFunc("/login", login). | 183 api.HandleFunc("/login", login). |
182 Methods(http.MethodPost) | 184 Methods(http.MethodPost) |
183 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). | 185 api.Handle("/logout", auth.SessionMiddleware(http.HandlerFunc(logout))). |