This commit is contained in:
eson 2023-09-05 17:07:42 +08:00
parent 358e33c6eb
commit 3a6eeb316b
2 changed files with 3 additions and 4 deletions

View File

@ -81,8 +81,7 @@ func CommonNotify(WebsocketAddr, wid string, event *wevent.WebsocketEvent) error
result := wresp.Json()
if result.Get("code").Int() != 200 {
// logx.Error(result.Get("message"))
return fmt.Errorf("%s", result.Get("message").Str)
return fmt.Errorf("%s", result.String())
}
return nil

View File

@ -75,14 +75,14 @@ func (l *UserResetPasswordLogic) UserResetPassword(req *types.RequestUserResetPa
if err != nil {
logx.Error(err)
return resp.SetStatus(basic.CodeDbSqlErr, err.Error())
return resp.SetStatusWithMessage(basic.CodeDbSqlErr, err.Error())
}
event := wevent.NewWebsocketEventSuccess(wevent.UserResetToken, rt.TraceId)
err = CommonNotify(l.svcCtx.Config.MainAddress, rt.Wid, event)
if err != nil {
logx.Error(err, rt.TraceId)
return resp.SetStatus(basic.CodeResetPasswordErr, err.Error())
return resp.SetStatusWithMessage(basic.CodeResetPasswordErr, err.Error())
}
// token := &auth.ResetToken{