fix: ajouter *http.Client
dans handlers avec bottinApiClient
Ajuster selon changement de signature de `bottindata.NewApiClient`
This commit is contained in:
parent
159abeffd2
commit
d60cf01c82
2 changed files with 8 additions and 0 deletions
|
@ -19,7 +19,11 @@ func GetHealth(c echo.Context) error {
|
||||||
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
||||||
bottinApiPort := viper.GetInt("bottin.api.port")
|
bottinApiPort := viper.GetInt("bottin.api.port")
|
||||||
|
|
||||||
|
bottinClient := http.DefaultClient
|
||||||
|
defer bottinClient.CloseIdleConnections()
|
||||||
|
|
||||||
bottinConnection := bottindata.NewApiClient(
|
bottinConnection := bottindata.NewApiClient(
|
||||||
|
bottinClient,
|
||||||
bottinApiKey,
|
bottinApiKey,
|
||||||
bottinApiHost,
|
bottinApiHost,
|
||||||
bottinApiProtocol,
|
bottinApiProtocol,
|
||||||
|
|
|
@ -80,8 +80,12 @@ func PostTransactions(c echo.Context) error {
|
||||||
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
bottinApiProtocol := viper.GetString("bottin.api.protocol")
|
||||||
bottinApiPort := viper.GetInt("bottin.api.port")
|
bottinApiPort := viper.GetInt("bottin.api.port")
|
||||||
|
|
||||||
|
bottinClient := http.DefaultClient
|
||||||
|
defer bottinClient.CloseIdleConnections()
|
||||||
|
|
||||||
// Using bottin's API client
|
// Using bottin's API client
|
||||||
bottinApiClient := bottindata.NewApiClient(
|
bottinApiClient := bottindata.NewApiClient(
|
||||||
|
bottinClient,
|
||||||
bottinApiKey,
|
bottinApiKey,
|
||||||
bottinApiHost,
|
bottinApiHost,
|
||||||
bottinApiProtocol,
|
bottinApiProtocol,
|
||||||
|
|
Loading…
Reference in a new issue