This commit is contained in:
eson 2023-08-29 15:15:39 +08:00
parent 57d95e0ebe
commit d884624aad

View File

@ -145,6 +145,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
err := u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
var err error
UserTx := tx.Model(user)
err = UserTx.Where("email = ?", token.Email).Take(user).Error
if err == gorm.ErrRecordNotFound {
@ -203,6 +204,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
})
logcontent += "end"
logx.Error(err)
if err != nil && err != gorm.ErrRecordNotFound {
return nil, err
}