Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [API] Add language to user api #9215

Merged
merged 3 commits into from
Nov 30, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion modules/convert/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func ToTeam(team *models.Team) *api.Team {

// ToUser convert models.User to api.User
// signed shall only be set if requester is logged in. authed shall only be set if user is site admin or user himself
func ToUser(user *models.User, signed, authed bool) *api.User {
func ToUser(user *models.User, signed bool, authed bool) *api.User {
6543 marked this conversation as resolved.
Show resolved Hide resolved
result := &api.User{
UserName: user.Name,
AvatarURL: user.AvatarLink(),
Expand All @@ -273,6 +273,7 @@ func ToUser(user *models.User, signed, authed bool) *api.User {
result.ID = user.ID
result.IsAdmin = user.IsAdmin
result.LastLogin = user.LastLoginUnix.AsTime()
result.Language = user.Language
}
return result
}
Expand Down