Tweak config content

This commit is contained in:
Jamie Curnow 2023-01-09 15:48:52 +10:00
parent 5586d16afd
commit 6147ee925e
2 changed files with 2 additions and 12 deletions

View File

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

View File

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