bottin/handlers/health.go
Victor Lacasse-Beaudoin 098d255190 Déplacer /v4 -> /v4/health
Renommer handler GetV4 pour GetHealth

Ajouter GetHealthResponse pour serialize et deserialize json response
2023-06-02 02:35:15 -04:00

18 lines
281 B
Go

package handlers
import (
"net/http"
"github.com/labstack/echo/v4"
)
type GetHealthResponse struct {
Message string `json:"message"`
}
func GetHealth(c echo.Context) error {
response := GetHealthResponse{"Bottin API v4 is ready"}
return c.JSON(http.StatusOK, response)
}