From 4d8ae6782b49a59b32d0993017d68b869e788824 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Wed, 14 Feb 2024 16:53:59 -0500 Subject: [PATCH] =?UTF-8?q?fix:=20ajouter=20client=20http=20=C3=A0=20`bott?= =?UTF-8?q?inClient`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Requis par version 6 du API client --- cmd/api.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cmd/api.go b/cmd/api.go index fa70ab6..62d96cc 100644 --- a/cmd/api.go +++ b/cmd/api.go @@ -7,6 +7,7 @@ import ( "crypto/subtle" "fmt" "log" + "net/http" "git.agecem.com/agecem/bottin-ag/apihandler" "git.agecem.com/agecem/bottin-ag/config" @@ -40,7 +41,15 @@ var apiCmd = &cobra.Command{ v0 := e.Group("/v0") - bottinApiClient := bottindata.NewApiClient(cfg.Bottin.API.Key, cfg.Bottin.API.Host, cfg.Bottin.API.Protocol, cfg.Bottin.API.Port) + httpClient := http.DefaultClient + + bottinApiClient := bottindata.NewApiClient( + httpClient, + cfg.Bottin.API.Key, + cfg.Bottin.API.Host, + cfg.Bottin.API.Protocol, + cfg.Bottin.API.Port, + ) dbClient, err := dbclient.New(cfg.DB.Host, cfg.DB.Database, cfg.DB.User, cfg.DB.Password, cfg.DB.Port, cfg.DB.UseSSL) if err != nil {