Skip to content

Commit

Permalink
add current time on ping handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopertz committed Sep 9, 2024
1 parent d09cb39 commit 6d28a06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/api/ping.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"net/http"
"time"

"github.com/labstack/echo/v4"
)
Expand All @@ -12,6 +13,7 @@ func (app *application) pingHandler(c echo.Context) error {
"status": "available",
"environment": app.config.ENV,
"version": version,
"current_time": time.Now().Format(time.RFC3339),
}

return c.JSON(http.StatusOK, ping)
Expand Down

0 comments on commit 6d28a06

Please sign in to comment.