changeset 3108:8a4fb02ee60a

Send empty JSON document when calling GET /api/system/config and "published-config" is not configure.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 25 Apr 2019 17:50:41 +0200
parents 8e364945a390
children 973312bb77c6
files pkg/controllers/system.go
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pkg/controllers/system.go	Thu Apr 25 17:17:36 2019 +0200
+++ b/pkg/controllers/system.go	Thu Apr 25 17:50:41 2019 +0200
@@ -87,10 +87,7 @@
 
 	cfg := config.PublishedConfig()
 	if cfg == "" {
-		err = JSONError{
-			Code:    http.StatusNotFound,
-			Message: "No published configuration found.",
-		}
+		jr = JSONResult{Result: strings.NewReader("{}")}
 		return
 	}