aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick/api/Notifications.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-15 14:21:27 +0300
committerGravatar Vitaly Takmazov2016-11-15 14:21:27 +0300
commit51d9de02265d6cc9d6045d79497d2a987ae2f7f7 (patch)
treed7dd2e534452cab45b8ebdba1e52c498951c5035 /juick-api/src/main/java/com/juick/api/Notifications.java
parent32a6feb195171e06d60117ad758cc8beb50e5ca3 (diff)
core classes are now serializeable with JAXB (to use as babbler extension)
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.java10
1 files changed, 5 insertions, 5 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 bec365ba..60fe95f3 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.getName().equals("juick"))) {
response.sendError(403);
return;
}
@@ -57,13 +57,13 @@ public class Notifications {
Message msg = MessagesQueries.getMessage(jdbc, mid);
if (msg != null) {
List<User> users;
- if (msg.getRID() > 0) {
- users = SubscriptionsQueries.getUsersSubscribedToComments(jdbc, mid, msg.getUser().getUID());
+ if (msg.getRid() > 0) {
+ users = SubscriptionsQueries.getUsersSubscribedToComments(jdbc, mid, msg.getUser().getUid());
} else {
- users = SubscriptionsQueries.getSubscribedUsers(jdbc, msg.getUser().getUID(), mid);
+ users = SubscriptionsQueries.getSubscribedUsers(jdbc, msg.getUser().getUid(), mid);
}
- List<Integer> uids = users.stream().map(User::getUID).collect(Collectors.toList());
+ List<Integer> uids = users.stream().map(User::getUid).collect(Collectors.toList());
switch (type) {
case "gcm":