fix: ajouter client http à bottinClient
#15
1 changed files with 10 additions and 1 deletions
11
cmd/api.go
11
cmd/api.go
|
@ -7,6 +7,7 @@ import (
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"git.agecem.com/agecem/bottin-ag/apihandler"
|
"git.agecem.com/agecem/bottin-ag/apihandler"
|
||||||
"git.agecem.com/agecem/bottin-ag/config"
|
"git.agecem.com/agecem/bottin-ag/config"
|
||||||
|
@ -40,7 +41,15 @@ var apiCmd = &cobra.Command{
|
||||||
|
|
||||||
v0 := e.Group("/v0")
|
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)
|
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 {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue