mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-02 05:47:31 +08:00
Go: refactor config (#17544)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -91,8 +91,8 @@ func InitVariables(store VariableStore) error {
|
||||
|
||||
// GetSecretKey returns the current secret key
|
||||
func GetSecretKey(store VariableStore) (string, error) {
|
||||
if globalConfig.General.SecretKey != nil {
|
||||
return *globalConfig.General.SecretKey, nil
|
||||
if globalConfig.GetSecretKey() != "" {
|
||||
return globalConfig.GetSecretKey(), nil
|
||||
}
|
||||
|
||||
generatedKey, err := utility.GenerateSecretKey()
|
||||
|
||||
Reference in New Issue
Block a user