Fix rollback camoufle erreurs dans InsertTransactions #28

Merged
vlbeaudoin merged 4 commits from fix/rollback-hides-insert-error into main 2024-01-05 16:52:26 -05:00
5 changed files with 15 additions and 2 deletions
Showing only changes of commit b54e118b93 - Show all commits

View file

@ -1,4 +1,4 @@
FROM golang:1.20.4 as build
FROM golang:1.21.4 as build
LABEL author="vlbeaudoin"

View file

@ -4,6 +4,7 @@ import (
"crypto/subtle"
"fmt"
"log"
"net/http"
"git.agecem.com/agecem/bottin-agenda/data"
"git.agecem.com/agecem/bottin-agenda/handlers"
@ -34,8 +35,12 @@ var apiCmd = &cobra.Command{
bottinApiProtocol := viper.GetString("bottin.api.protocol")
bottinApiPort := viper.GetInt("bottin.api.port")
bottinClient := http.DefaultClient
defer bottinClient.CloseIdleConnections()
// Using bottin's API client
bottinConnection := bottindata.NewApiClient(
bottinClient,
bottinApiKey,
bottinApiHost,
bottinApiProtocol,

View file

@ -1,7 +1,7 @@
services:
db:
image: 'docker.io/library/postgres:14.8'
image: 'docker.io/library/postgres:16.1'
environment:
POSTGRES_DATABASE: "${BOTTINAGENDA_POSTGRES_DATABASE}"
POSTGRES_PASSWORD: "${BOTTINAGENDA_POSTGRES_PASSWORD}"

View file

@ -19,7 +19,11 @@ func GetHealth(c echo.Context) error {
bottinApiProtocol := viper.GetString("bottin.api.protocol")
bottinApiPort := viper.GetInt("bottin.api.port")
bottinClient := http.DefaultClient
defer bottinClient.CloseIdleConnections()
bottinConnection := bottindata.NewApiClient(
bottinClient,
bottinApiKey,
bottinApiHost,
bottinApiProtocol,

View file

@ -80,8 +80,12 @@ func PostTransactions(c echo.Context) error {
bottinApiProtocol := viper.GetString("bottin.api.protocol")
bottinApiPort := viper.GetInt("bottin.api.port")
bottinClient := http.DefaultClient
defer bottinClient.CloseIdleConnections()
// Using bottin's API client
bottinApiClient := bottindata.NewApiClient(
bottinClient,
bottinApiKey,
bottinApiHost,
bottinApiProtocol,