This repository has been archived on 2024-12-15. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
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

17 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)
}