aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api/Users.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/api/Users.java')
-rw-r--r--src/main/java/com/juick/server/api/Users.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/com/juick/server/api/Users.java b/src/main/java/com/juick/server/api/Users.java
index 791071a5..c1cee8b5 100644
--- a/src/main/java/com/juick/server/api/Users.java
+++ b/src/main/java/com/juick/server/api/Users.java
@@ -69,12 +69,12 @@ public class Users {
if (!unames.isEmpty() && unames.size() < 20)
users.addAll(userService.getUsersByName(unames));
}
- users.forEach(u -> u.setAvatar(webApp.getAvatarPublicUrl(u)));
+ users.forEach(u -> u.setAvatar(webApp.getAvatarWebPath(u)));
if (!users.isEmpty())
return users;
if (!UserUtils.getCurrentUser().isAnonymous()) {
User visitor = UserUtils.getCurrentUser();
- visitor.setAvatar(webApp.getAvatarPublicUrl(visitor));
+ visitor.setAvatar(webApp.getAvatarWebPath(visitor));
return Collections.singletonList(visitor);
}
@@ -93,7 +93,7 @@ public class Users {
me.setUnreadCount(unread.size());
me.setRead(userService.getUserFriends(visitor.getUid()));
me.setReaders(userService.getUserReaders(visitor.getUid()));
- me.setAvatar(webApp.getAvatarPublicUrl(visitor));
+ me.setAvatar(webApp.getAvatarWebPath(visitor));
return me;
}
@@ -118,7 +118,7 @@ public class Users {
if (uid > 0) {
List<User> friends = userService.getUserFriends(uid);
- friends.forEach(f -> f.setAvatar(webApp.getAvatarPublicUrl(f)));
+ friends.forEach(f -> f.setAvatar(webApp.getAvatarWebPath(f)));
return friends;
}
throw new HttpNotFoundException();
@@ -145,7 +145,7 @@ public class Users {
if (uid > 0) {
List<User> readers = userService.getUserReaders(uid);
- readers.forEach(r -> r.setAvatar(webApp.getAvatarPublicUrl(r)));
+ readers.forEach(r -> r.setAvatar(webApp.getAvatarWebPath(r)));
return readers;
}
throw new HttpNotFoundException();
@@ -155,7 +155,7 @@ public class Users {
public UserInfo getUserInfo(@PathVariable String uname) {
User user = userService.getUserByName(uname);
if (!user.isBanned()) {
- user.setAvatar(webApp.getAvatarPublicUrl(user));
+ user.setAvatar(webApp.getAvatarWebPath(user));
return userService.getUserInfo(user);
}
throw new HttpNotFoundException();