Victor Lacasse-Beaudoin
098d255190
Renommer handler GetV4 pour GetHealth Ajouter GetHealthResponse pour serialize et deserialize json response
17 lines
281 B
Go
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)
|
|
}
|