From 346cdb1c3a7b54e3778604951caa684ea4f55d2e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 17 Nov 2016 00:08:56 +0300 Subject: juick-api: fix shit in notifications handler --- juick-api/src/main/java/com/juick/api/Notifications.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'juick-api/src/main/java/com/juick/api') 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 60fe95f3..a0c9cae9 100644 --- a/juick-api/src/main/java/com/juick/api/Notifications.java +++ b/juick-api/src/main/java/com/juick/api/Notifications.java @@ -41,15 +41,17 @@ public class Notifications { case "gcm": List tokens = PushQueries.getAndroidRegID(jdbc, uid); Main.replyJSON(request, response, mapper.writeValueAsString(tokens)); + break; case "apns": List apnsTokens = PushQueries.getAPNSToken(jdbc, uid); Main.replyJSON(request, response, mapper.writeValueAsString(apnsTokens)); + break; case "mpns": List mpnsTokens = PushQueries.getWinPhoneURL(jdbc, uid); Main.replyJSON(request, response, mapper.writeValueAsString(mpnsTokens)); + break; default: response.sendError(400); - return; } } else { @@ -69,19 +71,22 @@ public class Notifications { case "gcm": List tokens = PushQueries.getAndroidTokens(jdbc, uids); Main.replyJSON(request, response, mapper.writeValueAsString(tokens)); + break; case "apns": List apnsTokens = PushQueries.getAPNSTokens(jdbc, uids); Main.replyJSON(request, response, mapper.writeValueAsString(apnsTokens)); + break; case "mpns": List mpnsTokens = PushQueries.getWindowsTokens(jdbc, uids); Main.replyJSON(request, response, mapper.writeValueAsString(mpnsTokens)); + break; default: response.sendError(400); - return; } } + } else { + response.sendError(400); } } - response.sendError(400); } } -- cgit v1.2.3