mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-18 01:00:59 +00:00
feat: able to set initial quota for new user (close #22)
This commit is contained in:
@@ -46,6 +46,7 @@ func InitOptionMap() {
|
||||
common.OptionMap["WeChatAccountQRCodeImageURL"] = ""
|
||||
common.OptionMap["TurnstileSiteKey"] = ""
|
||||
common.OptionMap["TurnstileSecretKey"] = ""
|
||||
common.OptionMap["QuotaForNewUser"] = strconv.Itoa(common.QuotaForNewUser)
|
||||
common.OptionMapRWMutex.Unlock()
|
||||
options, _ := AllOption()
|
||||
for _, option := range options {
|
||||
@@ -131,5 +132,7 @@ func updateOptionMap(key string, value string) {
|
||||
common.TurnstileSiteKey = value
|
||||
case "TurnstileSecretKey":
|
||||
common.TurnstileSecretKey = value
|
||||
case "QuotaForNewUser":
|
||||
common.QuotaForNewUser, _ = strconv.Atoi(value)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user