Skip to content

Commit d39b552

Browse files
committed
hot-fix | add api_version as env variable set by default
1 parent 94d6695 commit d39b552

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

internal/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ type APIConfig struct {
1717
Host string `mapstructure:"host" default:"0.0.0.0"`
1818
Port string `mapstructure:"port" default:"8080"`
1919
DebugMode bool `mapstructure:"debug_mode" default:"false"`
20+
ApiVersion string `mapstructure:"api_version" default:"2024-09-01"`
2021
}
2122

2223
type AuthConfig struct {

internal/platform/repository/integrity_repository.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ type BloockIntegrityRepository struct {
2727
httpClient http.Client
2828
client client.BloockClient
2929
apiKey string
30+
apiVersion string
3031
logger zerolog.Logger
3132
}
3233

@@ -148,6 +149,7 @@ func (b BloockIntegrityRepository) postRequest(url string, body interface{}, res
148149
}
149150
req.Header.Set("X-API-KEY", apiKey)
150151
req.Header.Set("Content-Type", "application/json")
152+
req.Header.Set("api_version", b.apiVersion)
151153

152154
resp, err := b.httpClient.Do(req)
153155
if err != nil {

0 commit comments

Comments
 (0)