优化代码

This commit is contained in:
wsczx 2022-10-25 15:16:42 +08:00
parent 7032ebdc85
commit 88dd3c8860
1 changed files with 2 additions and 4 deletions

View File

@ -89,11 +89,9 @@ func UploadUser(file string) error {
if err := dbdata.AddBatch(user); err != nil { if err := dbdata.AddBatch(user); err != nil {
return fmt.Errorf("请检查是否导入有重复用户") return fmt.Errorf("请检查是否导入有重复用户")
} }
if user.SendEmail { if err := userAccountMail(user); user.SendEmail && err != nil {
if err := userAccountMail(user); err != nil {
return err return err
} }
} }
}
return nil return nil
} }