connected-to-google

This commit is contained in:
mario
2025-04-07 15:46:07 +07:00
parent f340bc5916
commit 9b8e0260f3
15 changed files with 282 additions and 286 deletions

View File

@@ -1,12 +1,19 @@
package handlers
import (
"encoding/json"
"net/http"
"github.com/gin-gonic/gin"
"time"
)
// HealthCheck is a simple health check handler
func HealthCheck(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"status": "ok"})
// 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)
}