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

feat: show avatar url in wakatime user model #553

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

GioPan04
Copy link
Contributor

@GioPan04 GioPan04 commented Nov 17, 2023

  • Added the photo field in the User WakaTime model. It returns the URL for the avatar API used in the frontend.
  • Replaced "Anonymous User" with the user id (should be more clear) in display_name

Email: user.Email,
TimeZone: tz,
Username: user.ID,
CreatedAt: user.CreatedAt,
ModifiedAt: user.CreatedAt,
Photo: fmt.Sprintf("%s%s/%s", config.Server.GetPublicUrl(), config.Server.BasePath, user.AvatarURL(config.App.AvatarURLTemplate)),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the CI test are failing because the config is not initialized during testing. I never done testing in Go and so I don't know where to fix

@muety muety merged commit 8a3dcd2 into muety:master Nov 18, 2023
5 of 7 checks passed
@GioPan04 GioPan04 deleted the show-avatar-api branch November 19, 2023 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants