Files
go-ohif-proxy/internal/api/handlers/healthcheck.go
2025-04-07 15:46:07 +07:00

20 lines
412 B
Go

package handlers
import (
"encoding/json"
"net/http"
"time"
)
// HealthCheck provides a simple health check endpoint
func HealthCheck(w http.ResponseWriter, r *http.Request) {
response := map[string]interface{}{
"status": "ok",
"timestamp": time.Now().Format(time.RFC3339),
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(response)
}