diff pkg/controllers/routes.go @ 1189:3d50f558870c

REST GET call to /imports now has the ability to be filtered by kinds or states. Something like &states=queued,running,failed,pending,accepted&kinds=sr Note: The states are not the current states of the import queue, yet. The import queue will be adjusted soon.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 16 Nov 2018 12:08:46 +0100
parents 71ba4a66ec95
children 3afa71405b87
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Thu Nov 15 19:06:53 2018 +0100
+++ b/pkg/controllers/routes.go	Fri Nov 16 12:08:46 2018 +0100
@@ -172,7 +172,9 @@
 		Methods(http.MethodGet).
 		Queries(
 			"offset", "{offset:[0-9]+}",
-			"limit", "{limit:[0-9]+}")
+			"limit", "{limit:[0-9]+}",
+			"states", "",
+			"kinds", "")
 
 	api.Handle("/imports", lsImports).Methods(http.MethodGet)