fix
This commit is contained in:
parent
5e6b5cbbbd
commit
3ab7ed28d4
|
@ -64,13 +64,13 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
|
|||
token, err := googleOauthConfig.Exchange(l.ctx, req.Code)
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
resp.SetStatus(basic.CodeApiErr)
|
||||
return resp.SetStatus(basic.CodeApiErr, err.Error())
|
||||
}
|
||||
|
||||
r, err := requests.Get("https://www.googleapis.com/oauth2/v2/userinfo?access_token=" + token.AccessToken).Execute()
|
||||
if err != nil {
|
||||
logx.Error(err)
|
||||
return resp.SetStatus(basic.CodeOAuthGoogleApiErr)
|
||||
return resp.SetStatus(basic.CodeOAuthGoogleApiErr, err.Error())
|
||||
}
|
||||
|
||||
log.Println(r.Json())
|
||||
|
|
Loading…
Reference in New Issue
Block a user