diff options
author | Vitaly Takmazov | 2018-06-27 13:20:35 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-06-27 13:20:35 +0300 |
commit | dd605a1731cdcdf02317bedf7d946605a21e0bd8 (patch) | |
tree | 3b4c083d9993192f4a6a5cbeef5eb945faa46bce /juick-server/src/main | |
parent | 9efeead3bae831abd66420771ebf2ad703df0026 (diff) |
add visitor hash to /users api
Diffstat (limited to 'juick-server/src/main')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Users.java | 4 |
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(); |