Skip to content

Commit 77a3d57

Browse files
committed
fixing normilization
1 parent ac03e30 commit 77a3d57

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

utils/config/loader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ func Load() {
7979

8080
config = mergeLayers()
8181

82-
InitTokens()
83-
8482
normalizeKeys(config)
8583

8684
templateConfig(config)
8785

86+
InitTokens()
87+
8888
InitEnv()
8989

9090
log.Info("Finished Loading Configuration")

utils/config/token-config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ func LoadTokens() {
1717
log.Debug("Loading Configs ", ENV.TOKENS_DIR)
1818

1919
LoadDir("tokenConfigs", ENV.TOKENS_DIR, tokensLayer, yaml.Parser())
20+
21+
normalizeKeys(tokensLayer)
22+
23+
templateConfig(tokensLayer)
2024
}
2125

2226
func InitTokens() {
2327
apiTokens := config.Strings("api.tokens")
2428

2529
var tokenConfigs []TOKEN_CONFIG_
2630

27-
transformChildrenUnderArray(config, "tokenConfigs", "override.variables", func(key string, value any) (string, any) {
31+
transformChildrenUnderArray(tokensLayer, "tokenConfigs", "override.variables", func(key string, value any) (string, any) {
2832
return strings.ToUpper(key), value
2933
})
3034

0 commit comments

Comments
 (0)