Files
pulse-api/internal/handler/health.go
2026-02-06 11:19:55 +00:00

21 lines
380 B
Go

package handler
import (
"encoding/json"
"net/http"
)
type HealthHandler struct{}
func NewHealthHandler() *HealthHandler {
return &HealthHandler{}
}
func (h *HealthHandler) Health(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{
"status": "ok",
"service": "homelab-api",
})
}