Add backend foundation and config-driven workbench
This commit is contained in:
21
backend/internal/httpapi/handlers/health_handler.go
Normal file
21
backend/internal/httpapi/handlers/health_handler.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"cmr-backend/internal/httpx"
|
||||
)
|
||||
|
||||
type HealthHandler struct{}
|
||||
|
||||
func NewHealthHandler() *HealthHandler {
|
||||
return &HealthHandler{}
|
||||
}
|
||||
|
||||
func (h *HealthHandler) Get(w http.ResponseWriter, r *http.Request) {
|
||||
httpx.WriteJSON(w, http.StatusOK, map[string]any{
|
||||
"data": map[string]any{
|
||||
"status": "ok",
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user