♻️ Refactored health HTTP delivery
This commit is contained in:
parent
4a7d6cc4b5
commit
4e933d21e0
|
@ -18,6 +18,5 @@ func (h *RequestHandler) Register(r *router.Router) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *RequestHandler) read(ctx *http.RequestCtx) {
|
func (h *RequestHandler) read(ctx *http.RequestCtx) {
|
||||||
ctx.SetContentType(common.MIMETextPlainCharsetUTF8)
|
ctx.SuccessString(common.MIMEApplicationJSONCharsetUTF8, `{}`)
|
||||||
ctx.SetStatusCode(http.StatusOK)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,4 +29,5 @@ func TestRequestHandler(t *testing.T) {
|
||||||
|
|
||||||
require.NoError(t, client.Do(req, resp))
|
require.NoError(t, client.Do(req, resp))
|
||||||
assert.Equal(t, http.StatusOK, resp.StatusCode())
|
assert.Equal(t, http.StatusOK, resp.StatusCode())
|
||||||
|
assert.Equal(t, `{}`, string(resp.Body()))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue