Fixed some small bugs after merge

This commit is contained in:
2026-06-14 11:30:58 +02:00
parent 0894d65ec5
commit 4e5bdc4ee2
21 changed files with 1460 additions and 186 deletions
+4 -3
View File
@@ -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())
}