diff options
Diffstat (limited to 'src/orchestrator/api/controllerhandler.go')
-rw-r--r-- | src/orchestrator/api/controllerhandler.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/orchestrator/api/controllerhandler.go b/src/orchestrator/api/controllerhandler.go index be300d89..418aa70f 100644 --- a/src/orchestrator/api/controllerhandler.go +++ b/src/orchestrator/api/controllerhandler.go @@ -28,6 +28,8 @@ import ( pkgerrors "github.com/pkg/errors" ) +var controllerJSONFile string = "json-schemas/controller.json" + // Used to store backend implementations objects // Also simplifies mocking for unit testing purposes type controllerHandler struct { @@ -87,9 +89,8 @@ func (h controllerHandler) createHandler(w http.ResponseWriter, r *http.Request) return } - jsonFile := "json-schemas/controller.json" // Verify JSON Body - err, httpError := validation.ValidateJsonSchemaData(jsonFile, m) + err, httpError := validation.ValidateJsonSchemaData(controllerJSONFile, m) if err != nil { http.Error(w, err.Error(), httpError) return |