diff pkg/controllers/routes.go @ 2042:d29ac997eb34 unify_imports

This breaks this branch!!!! Starting to remove the old persistent layer for configured imports.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Fri, 25 Jan 2019 16:07:09 +0100
parents f1e32babb587
children 09f9ae3d0526
line wrap: on
line diff
--- a/pkg/controllers/routes.go	Fri Jan 25 14:33:03 2019 +0100
+++ b/pkg/controllers/routes.go	Fri Jan 25 16:07:09 2019 +0100
@@ -15,6 +15,7 @@
 package controllers
 
 import (
+	"encoding/json"
 	"net/http"
 	"net/http/httputil"
 
@@ -243,7 +244,7 @@
 
 	api.Handle("/imports/config/{id:[0-9]+}",
 		waterwayAdmin(&JSONHandler{
-			Input:  func() interface{} { return new(imports.Config) },
+			Input:  func() interface{} { return &json.RawMessage{} },
 			Handle: modifyImportConfig,
 		})).Methods(http.MethodPatch)
 
@@ -259,7 +260,7 @@
 
 	api.Handle("/imports/config",
 		waterwayAdmin(&JSONHandler{
-			Input:  func() interface{} { return new(imports.Config) },
+			Input:  func() interface{} { return new(imports.ImportConfigIn) },
 			Handle: addImportConfig,
 		})).Methods(http.MethodPost)