aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-06-27 13:20:35 +0300
committerGravatar Vitaly Takmazov2018-06-27 13:20:35 +0300
commitdd605a1731cdcdf02317bedf7d946605a21e0bd8 (patch)
tree3b4c083d9993192f4a6a5cbeef5eb945faa46bce
parent9efeead3bae831abd66420771ebf2ad703df0026 (diff)
add visitor hash to /users api
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Users.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Users.java b/juick-server/src/main/java/com/juick/server/api/Users.java
index 5f8e66b0..2783e9bc 100644
--- a/juick-server/src/main/java/com/juick/server/api/Users.java
+++ b/juick-server/src/main/java/com/juick/server/api/Users.java
@@ -61,7 +61,9 @@ public class Users {
if (!users.isEmpty())
return users;
if (!UserUtils.getCurrentUser().isAnonymous()) {
- return Collections.singletonList(UserUtils.getCurrentUser());
+ com.juick.User visitor = UserUtils.getCurrentUser();
+ visitor.setAuthHash(getAuthToken());
+ return Collections.singletonList(visitor);
}
throw new HttpNotFoundException();