From b1978ca52ebdfdb3a8fb568127d528c23c9c903a Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Thu, 19 Sep 2024 01:39:51 -0400 Subject: [PATCH] add avatar to the UserDTO --- src/main/java/cc/pulseapp/api/model/user/UserDTO.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/cc/pulseapp/api/model/user/UserDTO.java b/src/main/java/cc/pulseapp/api/model/user/UserDTO.java index 0788fc1..98b9c03 100644 --- a/src/main/java/cc/pulseapp/api/model/user/UserDTO.java +++ b/src/main/java/cc/pulseapp/api/model/user/UserDTO.java @@ -28,6 +28,11 @@ public final class UserDTO { */ @Indexed @NonNull private final String username; + /** + * The hash to the avatar of this user, if any. + */ + private final String avatar; + /** * The tier of this user. */ @@ -58,7 +63,7 @@ public final class UserDTO { @NonNull public static UserDTO asDTO(@NonNull User user, @NonNull Date creationTime) { return new UserDTO(user.getSnowflake(), user.getEmail(), user.getUsername(), - user.getTier(), user.getFlags(), user.getLastLogin(), creationTime + user.getAvatar(), user.getTier(), user.getFlags(), user.getLastLogin(), creationTime ); } } \ No newline at end of file