File tree 1 file changed +12
-14
lines changed 1 file changed +12
-14
lines changed Original file line number Diff line number Diff line change @@ -236,21 +236,19 @@ func InfoOAuth(ctx *context.Context) {
236
236
})
237
237
return
238
238
}
239
- if uid != 0 {
240
- authUser , err := models .GetUserByID (uid )
241
- if err != nil {
242
- ctx .ServerError ("GetUserByID" , err )
243
- return
244
- }
245
- response := & userInfoResponse {
246
- Sub : fmt .Sprint (authUser .ID ),
247
- Name : authUser .FullName ,
248
- Username : authUser .Name ,
249
- Email : authUser .Email ,
250
- Picture : authUser .AvatarLink (),
251
- }
252
- ctx .JSON (http .StatusOK , response )
239
+ authUser , err := models .GetUserByID (uid )
240
+ if err != nil {
241
+ ctx .ServerError ("GetUserByID" , err )
242
+ return
243
+ }
244
+ response := & userInfoResponse {
245
+ Sub : fmt .Sprint (authUser .ID ),
246
+ Name : authUser .FullName ,
247
+ Username : authUser .Name ,
248
+ Email : authUser .Email ,
249
+ Picture : authUser .AvatarLink (),
253
250
}
251
+ ctx .JSON (http .StatusOK , response )
254
252
}
255
253
256
254
// AuthorizeOAuth manages authorize requests
You can’t perform that action at this time.
0 commit comments