add avatar to the UserDTO
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 48s
All checks were successful
Deploy API / deploy (ubuntu-latest, 2.44.0) (push) Successful in 48s
This commit is contained in:
parent
25485db0a5
commit
b1978ca52e
@ -28,6 +28,11 @@ public final class UserDTO {
|
|||||||
*/
|
*/
|
||||||
@Indexed @NonNull private final String username;
|
@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.
|
* The tier of this user.
|
||||||
*/
|
*/
|
||||||
@ -58,7 +63,7 @@ public final class UserDTO {
|
|||||||
@NonNull
|
@NonNull
|
||||||
public static UserDTO asDTO(@NonNull User user, @NonNull Date creationTime) {
|
public static UserDTO asDTO(@NonNull User user, @NonNull Date creationTime) {
|
||||||
return new UserDTO(user.getSnowflake(), user.getEmail(), user.getUsername(),
|
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
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user