package server import ( "net/http" "github.com/labstack/echo/v5" "music-server/internal/db" ) type HealthHandler struct { } func NewHealthHandler() *HealthHandler { return &HealthHandler{} } // HealthCheck godoc // // @Summary Check server health // @Description Returns the health status of the server // @Tags health // @Accept json // @Produce json // @Success 200 {string} string "OK" // @Router /health [get] func (h *HealthHandler) HealthCheck(ctx *echo.Context) error { return ctx.JSON(http.StatusOK, db.Health()) }