Skip to content

Commit 6147ee9

Browse files
committed
Tweak config content
1 parent 5586d16 commit 6147ee9

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

backend/internal/api/handler/hosts.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,7 @@ func GetHostNginxConfig(format string) func(http.ResponseWriter, *http.Request)
191191
h.ResultResponseText(w, r, http.StatusOK, content)
192192
return
193193
}
194-
195-
j := struct {
196-
Content string `json:"content"`
197-
}{Content: content}
198-
199-
h.ResultResponseJSON(w, r, http.StatusOK, j)
194+
h.ResultResponseJSON(w, r, http.StatusOK, content)
200195
default:
201196
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
202197
}

backend/internal/api/handler/upstreams.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ func GetUpstreamNginxConfig(format string) func(http.ResponseWriter, *http.Reque
144144
h.ResultResponseText(w, r, http.StatusOK, content)
145145
return
146146
}
147-
148-
j := struct {
149-
Content string `json:"content"`
150-
}{Content: content}
151-
152-
h.ResultResponseJSON(w, r, http.StatusOK, j)
147+
h.ResultResponseJSON(w, r, http.StatusOK, content)
153148
default:
154149
h.ResultErrorJSON(w, r, http.StatusBadRequest, err.Error(), nil)
155150
}

0 commit comments

Comments
 (0)