This commit is contained in:
2025-11-19 15:22:55 +00:00
parent 20d0f5e43e
commit d9e48495f7
6 changed files with 172 additions and 20 deletions

View File

@@ -32,6 +32,13 @@ type Config struct {
func New() *Config {
mongoURI := getMongoURI()
kpAPIKey := getEnv(EnvKPAPIKey, "")
if kpAPIKey == "" {
log.Printf("[Config] ⚠️ KPAPI_KEY is not set")
} else {
log.Printf("[Config] KPAPI_KEY is set (first 10 chars): %s...", kpAPIKey[:10])
}
return &Config{
MongoURI: mongoURI,
@@ -53,7 +60,7 @@ func New() *Config {
FrontendURL: getEnv(EnvFrontendURL, ""),
VibixHost: getEnv(EnvVibixHost, DefaultVibixHost),
VibixToken: getEnv(EnvVibixToken, ""),
KPAPIKey: getEnv(EnvKPAPIKey, ""),
KPAPIKey: kpAPIKey,
HDVBToken: getEnv(EnvHDVBToken, ""),
KPAPIBaseURL: getEnv("KPAPI_BASE_URL", DefaultKPAPIBase),
}