♻️ 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) {
|
||||
ctx.SetContentType(common.MIMETextPlainCharsetUTF8)
|
||||
ctx.SetStatusCode(http.StatusOK)
|
||||
ctx.SuccessString(common.MIMEApplicationJSONCharsetUTF8, `{}`)
|
||||
}
|
||||
|
|
|
@ -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()))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue