|
|
@ -48,6 +48,10 @@ func toUser(user *models.User, signed, authed bool) *api.User {
|
|
|
|
Location: user.Location,
|
|
|
|
Location: user.Location,
|
|
|
|
Website: user.Website,
|
|
|
|
Website: user.Website,
|
|
|
|
Description: user.Description,
|
|
|
|
Description: user.Description,
|
|
|
|
|
|
|
|
// counter's
|
|
|
|
|
|
|
|
Followers: user.NumFollowers,
|
|
|
|
|
|
|
|
Following: user.NumFollowing,
|
|
|
|
|
|
|
|
StarredRepos: user.NumStars,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// hide primary email if API caller is anonymous or user keep email private
|
|
|
|
// hide primary email if API caller is anonymous or user keep email private
|
|
|
|
if signed && (!user.KeepEmailPrivate || authed) {
|
|
|
|
if signed && (!user.KeepEmailPrivate || authed) {
|
|
|
|