Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatesh2k3 committed Jul 2, 2024
2 parents f443860 + 2ef3e32 commit deb36f3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/ai/elimu/web/SignOnControllerDiscord.java
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ public String handleCallback(HttpServletRequest request) throws IOException, Int
contributor.setImageUrl(uriAvatar);
}


if (!jsonObject.isNull("avatar")) {
String uriAvatar = "https://cdn.discordapp.com/avatars/" + jsonObject.getLong("id") + "/" + jsonObject.getString("avatar") + ".png";
logger.info("Avatar URL: " + uriAvatar);
contributor.setImageUrl(uriAvatar);

Check warning on line 147 in src/main/java/ai/elimu/web/SignOnControllerDiscord.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/ai/elimu/web/SignOnControllerDiscord.java#L145-L147

Added lines #L145 - L147 were not covered by tests
}

if (jsonObject.has("username")) {
contributor.setFirstName(jsonObject.getString("username"));
}
Expand Down

0 comments on commit deb36f3

Please sign in to comment.