feat: channels/audit UI unify, apply flow hardening, bump v1.1.12
This commit is contained in:
@@ -24,6 +24,13 @@ type Config struct {
|
||||
AppID string `yaml:"appid"`
|
||||
Secret string `yaml:"secret"`
|
||||
} `yaml:"qqbot"`
|
||||
Feishu struct {
|
||||
Enabled bool `yaml:"enabled"`
|
||||
AppID string `yaml:"app_id"`
|
||||
AppSecret string `yaml:"app_secret"`
|
||||
VerificationToken string `yaml:"verification_token"`
|
||||
EncryptKey string `yaml:"encrypt_key"`
|
||||
} `yaml:"feishu"`
|
||||
Admin struct {
|
||||
Username string `yaml:"username"`
|
||||
Password string `yaml:"password"`
|
||||
@@ -71,5 +78,10 @@ func (c *Config) Validate() error {
|
||||
return fmt.Errorf("qqbot 已启用但 appid 或 secret 为空")
|
||||
}
|
||||
}
|
||||
if c.Feishu.Enabled {
|
||||
if c.Feishu.AppID == "" || c.Feishu.AppSecret == "" {
|
||||
return fmt.Errorf("feishu 已启用但 app_id 或 app_secret 为空")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user