Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop

This commit is contained in:
laodaming 2023-08-29 15:19:07 +08:00
commit 8ec3ec07f6

View File

@ -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 {