aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/Notifications.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-10 08:08:50 +0300
committerGravatar Vitaly Takmazov2016-11-10 08:08:50 +0300
commit4a140f0a7ea988c2be47186c23a9f750f9ba597d (patch)
treebd34d0ab49286945b3ec83c6b44d1347b054cd6b /juick-api/src/main/java/com/juick/api/Notifications.java
parente3ec404a47be5ac03493481301e45cebadb25f22 (diff)
api: fix NPE
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/Notifications.java')
-rw-r--r--juick-api/src/main/java/com/juick/api/Notifications.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-api/src/main/java/com/juick/api/Notifications.java b/juick-api/src/main/java/com/juick/api/Notifications.java
index 2c846d6f..bec365ba 100644
--- a/juick-api/src/main/java/com/juick/api/Notifications.java
+++ b/juick-api/src/main/java/com/juick/api/Notifications.java
@@ -29,7 +29,7 @@ public class Notifications {
public void doGet(HttpServletRequest request, HttpServletResponse response, int vuid) throws IOException {
User visitor = UserQueries.getUserByUID(jdbc, vuid).orElse(new User());
- if ((visitor.getUID() == 0) && !(visitor.getUName().equals("juick"))) {
+ if ((visitor.getUID() == 0) || !(visitor.getUName().equals("juick"))) {
response.sendError(403);
return;
}