auth/internal/health/delivery/http/health_http.go

23 lines
452 B
Go
Raw Normal View History

package http
import (
"github.com/fasthttp/router"
http "github.com/valyala/fasthttp"
2021-11-14 21:15:28 +00:00
"source.toby3d.me/website/indieauth/internal/common"
)
type RequestHandler struct{}
func NewRequestHandler() *RequestHandler {
2021-12-28 23:08:50 +00:00
return &RequestHandler{}
}
func (h *RequestHandler) Register(r *router.Router) {
2021-12-28 23:08:50 +00:00
r.GET("/health", h.read)
}
2021-12-28 23:08:50 +00:00
func (h *RequestHandler) read(ctx *http.RequestCtx) {
ctx.SuccessString(common.MIMEApplicationJSONCharsetUTF8, `{}`)
}