fix(xunlei):missing x-client-id error in some user requests

This commit is contained in:
foxxorcat
2022-05-09 18:14:52 +08:00
parent bf0ee3d315
commit 52dcbfe1a4
2 changed files with 11 additions and 2 deletions

View File

@ -105,7 +105,7 @@ func (driver XunLeiCloud) Items() []base.Item {
Label: "device id",
Default: utils.GetMD5Encode(uuid.NewString()),
Type: base.TypeString,
Required: false,
Required: true,
},
}
}
@ -118,8 +118,10 @@ func (driver XunLeiCloud) Save(account *model.Account, old *model.Account) error
client := GetClient(account)
// 指定验证通过的captchaToken
if client.captchaToken != "" {
client.Lock()
client.captchaToken = account.CaptchaToken
account.CaptchaToken = ""
client.Unlock()
}
if client.token == "" {