Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
8ec3ec07f6
|
@ -136,15 +136,19 @@ type UserProfile struct {
|
|||
|
||||
// 自平台的注册流程
|
||||
func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterToken) (*FsUser, error) {
|
||||
|
||||
var err error
|
||||
|
||||
user := &FsUser{}
|
||||
|
||||
logcontent := ""
|
||||
defer func() {
|
||||
logx.Info("aaaa:", logcontent)
|
||||
logx.Info("aaaa:", logcontent, err)
|
||||
}()
|
||||
|
||||
err := u.db.WithContext(ctx).Transaction(func(tx *gorm.DB) error {
|
||||
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 {
|
||||
|
|
Loading…
Reference in New Issue
Block a user