aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-api/src/main/java/com/juick/api/controllers/Users.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/juick-api/src/main/java/com/juick/api/controllers/Users.java b/juick-api/src/main/java/com/juick/api/controllers/Users.java
index 4881d841..dc8ebc84 100644
--- a/juick-api/src/main/java/com/juick/api/controllers/Users.java
+++ b/juick-api/src/main/java/com/juick/api/controllers/Users.java
@@ -28,6 +28,7 @@ import org.springframework.web.bind.annotation.*;
import javax.inject.Inject;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
/**
@@ -65,6 +66,9 @@ public class Users {
if (!users.isEmpty())
return users;
+ if (!UserUtils.getCurrentUser().isAnonymous()) {
+ return Collections.singletonList(UserUtils.getCurrentUser());
+ }
throw new HttpNotFoundException();
}