if we're completing the InfluxDB setup via automation, attempt to store the token in the config file automatically.

pull/228/head
Jason Kulatunga 3 years ago
parent 9ebf252d4f
commit 5fb5b9afbe

@ -9,6 +9,7 @@ import (
type Interface interface { type Interface interface {
Init() error Init() error
ReadConfig(configFilePath string) error ReadConfig(configFilePath string) error
WriteConfig() error
Set(key string, value interface{}) Set(key string, value interface{})
SetDefault(key string, value interface{}) SetDefault(key string, value interface{})

@ -99,7 +99,9 @@ func NewScrutinyRepository(appConfig config.Interface, globalLogger logrus.Field
} }
appConfig.Set("web.influxdb.token", *onboardingResponse.Auth.Token) appConfig.Set("web.influxdb.token", *onboardingResponse.Auth.Token)
//todo: determine if we should write the config file out here. // we should write the config file out here. Ignore failures.
_ = appConfig.WriteConfig()
} }
// Use blocking write client for writes to desired bucket // Use blocking write client for writes to desired bucket

Loading…
Cancel
Save