fix(auth) upbind email not update
This commit is contained in:
parent
6034a32e85
commit
f6ce7b2cd3
@ -48,7 +48,7 @@ func (l *UpdateBindEmailLogic) UpdateBindEmail(req *types.UpdateBindEmailRequest
|
|||||||
if m.Id > 0 {
|
if m.Id > 0 {
|
||||||
return errors.Wrapf(xerr.NewErrCode(xerr.UserExist), "email already bind")
|
return errors.Wrapf(xerr.NewErrCode(xerr.UserExist), "email already bind")
|
||||||
}
|
}
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if method.Id == 0 {
|
||||||
method = &user.AuthMethods{
|
method = &user.AuthMethods{
|
||||||
UserId: u.Id,
|
UserId: u.Id,
|
||||||
AuthType: "email",
|
AuthType: "email",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user