diff options
author | Vitaly Takmazov | 2016-11-17 00:08:56 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-17 00:08:56 +0300 |
commit | 346cdb1c3a7b54e3778604951caa684ea4f55d2e (patch) | |
tree | 3a2918677dddb06bfa18b26835644653a5924cf4 /juick-api/src/main | |
parent | ffb24e0d469aaafa35ad5f460a7bdf771382f0ff (diff) |
juick-api: fix shit in notifications handler
Diffstat (limited to 'juick-api/src/main')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/Notifications.java | 11 |
1 files changed, 8 insertions, 3 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 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<String> tokens = PushQueries.getAndroidRegID(jdbc, uid); Main.replyJSON(request, response, mapper.writeValueAsString(tokens)); + break; case "apns": List<String> apnsTokens = PushQueries.getAPNSToken(jdbc, uid); Main.replyJSON(request, response, mapper.writeValueAsString(apnsTokens)); + break; case "mpns": List<String> 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<String> tokens = PushQueries.getAndroidTokens(jdbc, uids); Main.replyJSON(request, response, mapper.writeValueAsString(tokens)); + break; case "apns": List<String> apnsTokens = PushQueries.getAPNSTokens(jdbc, uids); Main.replyJSON(request, response, mapper.writeValueAsString(apnsTokens)); + break; case "mpns": List<String> 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); } } |