From 6147ee925e3b7fee688c7781ca2ce11daf8738ac Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Mon, 9 Jan 2023 15:48:52 +1000 Subject: [PATCH] Tweak config content --- backend/internal/api/handler/hosts.go | 7 +------ backend/internal/api/handler/upstreams.go | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/backend/internal/api/handler/hosts.go b/backend/internal/api/handler/hosts.go index 9fcece7..64e1e21 100644 --- a/backend/internal/api/handler/hosts.go +++ b/backend/internal/api/handler/hosts.go @@ -191,12 +191,7 @@ func GetHostNginxConfig(format string) func(http.ResponseWriter, *http.Request) h.ResultResponseText(w, r, http.StatusOK, content) return } - - j := struct { - Content string `json:"content"` - }{Content: content} - - h.ResultResponseJSON(w, r, http.StatusOK, j) + h.ResultResponseJSON(w, r, http.StatusOK, content) default: h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil) } diff --git a/backend/internal/api/handler/upstreams.go b/backend/internal/api/handler/upstreams.go index 1ee6287..3d2e2a4 100644 --- a/backend/internal/api/handler/upstreams.go +++ b/backend/internal/api/handler/upstreams.go @@ -144,12 +144,7 @@ func GetUpstreamNginxConfig(format string) func(http.ResponseWriter, *http.Reque h.ResultResponseText(w, r, http.StatusOK, content) return } - - j := struct { - Content string `json:"content"` - }{Content: content} - - h.ResultResponseJSON(w, r, http.StatusOK, j) + h.ResultResponseJSON(w, r, http.StatusOK, content) default: h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil) }