♻️ Refactored health HTTP delivery

This commit is contained in:
Maxim Lebedev 2021-12-30 02:18:06 +05:00
parent 4a7d6cc4b5
commit 4e933d21e0
Signed by: toby3d
GPG Key ID: 1F14E25B7C119FC5
2 changed files with 2 additions and 2 deletions

View File

@ -18,6 +18,5 @@ func (h *RequestHandler) Register(r *router.Router) {
}
func (h *RequestHandler) read(ctx *http.RequestCtx) {
ctx.SetContentType(common.MIMETextPlainCharsetUTF8)
ctx.SetStatusCode(http.StatusOK)
ctx.SuccessString(common.MIMEApplicationJSONCharsetUTF8, `{}`)
}

View File

@ -29,4 +29,5 @@ func TestRequestHandler(t *testing.T) {
require.NoError(t, client.Do(req, resp))
assert.Equal(t, http.StatusOK, resp.StatusCode())
assert.Equal(t, `{}`, string(resp.Body()))
}