🔖 chore: add chat image request proxy address

This commit is contained in:
MartialBE
2024-05-29 04:01:28 +08:00
parent 3d8a51e139
commit b5a4283b28
11 changed files with 76 additions and 53 deletions

View File

@@ -16,8 +16,7 @@ type Option struct {
func AllOption() ([]*Option, error) {
var options []*Option
var err error
err = DB.Find(&options).Error
err := DB.Find(&options).Error
return options, err
}
@@ -83,6 +82,8 @@ func InitOptionMap() {
config.OptionMap["ChatCacheEnabled"] = strconv.FormatBool(config.ChatCacheEnabled)
config.OptionMap["ChatCacheExpireMinute"] = strconv.Itoa(config.ChatCacheExpireMinute)
config.OptionMap["ChatImageRequestProxy"] = ""
config.OptionMapRWMutex.Unlock()
loadOptionsFromDatabase()
}
@@ -174,6 +175,7 @@ var optionStringMap = map[string]*string{
"ChatLinks": &config.ChatLinks,
"LarkClientId": &config.LarkClientId,
"LarkClientSecret": &config.LarkClientSecret,
"ChatImageRequestProxy": &config.ChatImageRequestProxy,
}
func updateOptionMap(key string, value string) (err error) {