Files
easywish/backend/internal/controllers/service.go

23 lines
465 B
Go

package controllers
import (
"net/http"
"github.com/gin-gonic/gin"
)
type HealthStatus struct {
Healthy bool `json:"healthy"`
}
// @Summary Get health status
// @Description Used internally for checking service health
// @Tags Service
// @Accept json
// @Produce json
// @Success 200 {object} HealthStatus "Says whether it's healthy or not"
// @Router /service/health [get]
func HealthCheck(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"healthy": true})
}