From 788dd4a375535d57617b8bc7fea16edb8184862b Mon Sep 17 00:00:00 2001 From: Majorfi Date: Wed, 6 Nov 2024 16:19:43 +0100 Subject: [PATCH] feat: health --- cmd/server.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/server.go b/cmd/server.go index 4983af1d..1d654ffe 100755 --- a/cmd/server.go +++ b/cmd/server.go @@ -44,6 +44,10 @@ func NewRouter() *gin.Engine { ctx.JSON(http.StatusOK, gin.H{"message": "Welcome to yDaemon"}) }) + router.GET(`/health`, func(ctx *gin.Context) { + ctx.JSON(http.StatusOK, gin.H{"status": "ok", "timestamp": time.Now().Format(time.RFC3339)}) + }) + // Vaults section { c := vaults.Controller{}