fix
This commit is contained in:
parent
57d95e0ebe
commit
d884624aad
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user