fix
This commit is contained in:
parent
a83486bdf3
commit
7f84cb5173
|
@ -135,11 +135,7 @@ type UserProfile struct {
|
|||
}
|
||||
|
||||
// 自平台的注册流程
|
||||
func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (*FsUser, error) {
|
||||
|
||||
var err error
|
||||
|
||||
user := &FsUser{}
|
||||
func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (user *FsUser, err error) {
|
||||
|
||||
logcontent := ""
|
||||
defer func() {
|
||||
|
@ -148,6 +144,8 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||
|
||||
err = u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||
|
||||
user = &FsUser{}
|
||||
|
||||
var err error
|
||||
UserTx := tx.Model(user)
|
||||
err = UserTx.Where("email = ?", token.Email).Take(user).Error
|
||||
|
@ -217,7 +215,7 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||
return nil, err
|
||||
}
|
||||
|
||||
return user, nil
|
||||
return
|
||||
}
|
||||
|
||||
func (u *FsUserModel) UpdateUserBasicInfoById(ctx context.Context, Id int64, user *UserBasicInfoForSave) (err error) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user