health_handler.go 348 B

123456789101112131415161718192021
  1. package handlers
  2. import (
  3. "net/http"
  4. "cmr-backend/internal/httpx"
  5. )
  6. type HealthHandler struct{}
  7. func NewHealthHandler() *HealthHandler {
  8. return &HealthHandler{}
  9. }
  10. func (h *HealthHandler) Get(w http.ResponseWriter, r *http.Request) {
  11. httpx.WriteJSON(w, http.StatusOK, map[string]any{
  12. "data": map[string]any{
  13. "status": "ok",
  14. },
  15. })
  16. }