Fixed some small bugs after merge
This commit is contained in:
@@ -8,10 +8,11 @@ import (
|
||||
)
|
||||
|
||||
type HealthHandler struct {
|
||||
db *db.Database
|
||||
}
|
||||
|
||||
func NewHealthHandler() *HealthHandler {
|
||||
return &HealthHandler{}
|
||||
func NewHealthHandler(database *db.Database) *HealthHandler {
|
||||
return &HealthHandler{db: database}
|
||||
}
|
||||
|
||||
// HealthCheck godoc
|
||||
@@ -24,5 +25,5 @@ func NewHealthHandler() *HealthHandler {
|
||||
// @Success 200 {string} string "OK"
|
||||
// @Router /health [get]
|
||||
func (h *HealthHandler) HealthCheck(ctx *echo.Context) error {
|
||||
return ctx.JSON(http.StatusOK, db.Health())
|
||||
return ctx.JSON(http.StatusOK, h.db.Health())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user