feat: impl requests handllers for contacts and healthcheck

This commit is contained in:
2025-11-02 22:03:10 -03:00
parent 4a28259dc8
commit 3b1b05d5a6
5 changed files with 342 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
package handler
import (
"encoding/json"
"net/http"
)
func HandlHealthChecks(mux *http.ServeMux) {
routes := []Route{{"GET /health", healthCheck}}
NewBaseHandler(mux, routes)
}
func healthCheck(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
json.NewEncoder(w).Encode(map[string]string{"status": "ok"})
}