From dd605a1731cdcdf02317bedf7d946605a21e0bd8 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 27 Jun 2018 13:20:35 +0300 Subject: add visitor hash to /users api --- juick-server/src/main/java/com/juick/server/api/Users.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'juick-server/src/main/java/com/juick') 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(); -- cgit v1.2.3