Fix rollback camoufle erreurs dans InsertTransactions #28
5 changed files with 15 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.20.4 as build
|
FROM golang:1.21.4 as build
|
||||||
|
|
||||||
LABEL author="vlbeaudoin"
|
LABEL author="vlbeaudoin"
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import (
|
||||||
"crypto/subtle"
|
"crypto/subtle"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"git.agecem.com/agecem/bottin-agenda/data"
|
"git.agecem.com/agecem/bottin-agenda/data"
|
||||||
"git.agecem.com/agecem/bottin-agenda/handlers"
|
"git.agecem.com/agecem/bottin-agenda/handlers"
|
||||||
|
@ -34,8 +35,12 @@ var apiCmd = &cobra.Command{
|
||||||
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
|
||||||
bottinConnection := bottindata.NewApiClient(
|
bottinConnection := bottindata.NewApiClient(
|
||||||
|
bottinClient,
|
||||||
bottinApiKey,
|
bottinApiKey,
|
||||||
bottinApiHost,
|
bottinApiHost,
|
||||||
bottinApiProtocol,
|
bottinApiProtocol,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
services:
|
services:
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: 'docker.io/library/postgres:14.8'
|
image: 'docker.io/library/postgres:16.1'
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_DATABASE: "${BOTTINAGENDA_POSTGRES_DATABASE}"
|
POSTGRES_DATABASE: "${BOTTINAGENDA_POSTGRES_DATABASE}"
|
||||||
POSTGRES_PASSWORD: "${BOTTINAGENDA_POSTGRES_PASSWORD}"
|
POSTGRES_PASSWORD: "${BOTTINAGENDA_POSTGRES_PASSWORD}"
|
||||||
|
|
|
@ -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