Mettre à jour avec bottin api v5

This commit is contained in:
Victor Lacasse-Beaudoin 2023-06-03 19:48:37 -04:00
parent bcd12582f1
commit 8adb253f47
6 changed files with 31 additions and 29 deletions

View file

@ -6,7 +6,7 @@ import (
"log"
"git.agecem.com/agecem/bottin-agenda/handlers"
bottindata "git.agecem.com/agecem/bottin/v4/data"
bottindata "git.agecem.com/agecem/bottin/v5/data"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"github.com/spf13/cobra"
@ -64,19 +64,18 @@ var apiCmd = &cobra.Command{
// Routes
e.GET("/v2/", handlers.GetV2)
e.GET("/v2/health/", handlers.GetHealth)
e.GET("/v2/membres/:membre_id", handlers.GetMembre)
e.GET("/v2/membres/:membre_id/", handlers.GetMembre)
// Check bottin is ready
message, err := bottinConnection.GetV4()
bottinHealthResponse, err := bottinConnection.GetHealth()
if err != nil {
log.Fatal(err)
log.Fatalf("bottinConnection.GetHealth(): %s", err)
}
//TODO
log.Println(message)
log.Println(bottinHealthResponse)
// Execution