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) }