mirror of https://github.com/Xhofe/alist
✨ support empty password
parent
8a219d0732
commit
5c3f91bb55
|
@ -114,7 +114,11 @@ func LoadSettings() {
|
||||||
// token
|
// token
|
||||||
adminPassword, err := GetSettingByKey("password")
|
adminPassword, err := GetSettingByKey("password")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
conf.Token = utils.GetMD5Encode(fmt.Sprintf("https://github.com/Xhofe/alist-%s", adminPassword.Value))
|
if adminPassword.Value != "" {
|
||||||
|
conf.Token = utils.GetMD5Encode(fmt.Sprintf("https://github.com/Xhofe/alist-%s", adminPassword.Value))
|
||||||
|
} else {
|
||||||
|
conf.Token = ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// load settings
|
// load settings
|
||||||
for _, key := range conf.LoadSettings {
|
for _, key := range conf.LoadSettings {
|
||||||
|
|
Loading…
Reference in New Issue