feat: able to set initial quota for new user (close #22)

This commit is contained in:
JustSong
2023-04-26 21:40:56 +08:00
parent 8c305dc1bc
commit b9cc5dfa3f
6 changed files with 59 additions and 1 deletions

View File

@@ -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)
}
}