e6f8b15e05
- Remove duplicate CaddyConfig in proxy_host.go (exists in caddy_config.go) - Remove duplicate HealthHandler in proxy_host_handler.go - Fix version variable names in health_handler.go (SemVer→Version, BuildDate→BuildTime) - Update frontend package-lock.json to sync with package.json dependencies - Backend now compiles successfully (1 test fails but will be fixed later)
20 lines
441 B
Go
20 lines
441 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/Wikid82/CaddyProxyManagerPlus/backend/internal/version"
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// HealthHandler responds with basic service metadata for uptime checks.
|
|
func HealthHandler(c *gin.Context) {
|
|
c.JSON(http.StatusOK, gin.H{
|
|
"status": "ok",
|
|
"service": version.Name,
|
|
"version": version.Version,
|
|
"git_commit": version.GitCommit,
|
|
"build_time": version.BuildTime,
|
|
})
|
|
}
|