Migrer client API à voki
This commit is contained in:
parent
1b046cc5e0
commit
78ea51e2c5
4 changed files with 14 additions and 79 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"log"
|
||||
"net/http"
|
||||
|
||||
"codeberg.org/vlbeaudoin/voki"
|
||||
"git.agecem.com/agecem/bottin-ag/apiclient"
|
||||
"git.agecem.com/agecem/bottin-ag/config"
|
||||
"git.agecem.com/agecem/bottin-ag/webcontent"
|
||||
|
@ -33,7 +34,12 @@ var webCmd = &cobra.Command{
|
|||
|
||||
e.Pre(middleware.AddTrailingSlash())
|
||||
|
||||
apiClient := apiclient.New(cfg.Web.API.Key, cfg.Web.API.Host, cfg.Web.API.Protocol, cfg.Web.API.Port)
|
||||
client := http.DefaultClient
|
||||
defer client.CloseIdleConnections()
|
||||
|
||||
apiClient := &apiclient.APIClient{
|
||||
Voki: voki.New(client, cfg.Web.API.Host, cfg.Web.API.Key, cfg.Web.API.Port, cfg.Web.API.Protocol),
|
||||
}
|
||||
|
||||
handler := webhandler.New(apiClient)
|
||||
|
||||
|
|
Reference in a new issue