aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/www/api')
-rw-r--r--src/main/java/com/juick/www/api/Notifications.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main/java/com/juick/www/api/Notifications.java b/src/main/java/com/juick/www/api/Notifications.java
index 43465c1a..5f941ba5 100644
--- a/src/main/java/com/juick/www/api/Notifications.java
+++ b/src/main/java/com/juick/www/api/Notifications.java
@@ -133,15 +133,15 @@ public class Notifications {
throw new HttpForbiddenException();
}
list.forEach(t -> {
- switch (t.getType()) {
+ switch (t.type()) {
case "gcm":
- pushQueriesService.deleteGCMToken(t.getToken());
+ pushQueriesService.deleteGCMToken(t.token());
break;
case "apns":
- pushQueriesService.deleteAPNSToken(t.getToken());
+ pushQueriesService.deleteAPNSToken(t.token());
break;
case "mpns":
- pushQueriesService.deleteMPNSToken(t.getToken());
+ pushQueriesService.deleteMPNSToken(t.token());
break;
default:
throw new HttpBadRequestException();
@@ -159,15 +159,15 @@ public class Notifications {
throw new HttpForbiddenException();
}
list.forEach(t -> {
- switch (t.getType()) {
+ switch (t.type()) {
case "gcm":
- pushQueriesService.deleteGCMToken(t.getToken());
+ pushQueriesService.deleteGCMToken(t.token());
break;
case "apns":
- pushQueriesService.deleteAPNSToken(t.getToken());
+ pushQueriesService.deleteAPNSToken(t.token());
break;
case "mpns":
- pushQueriesService.deleteMPNSToken(t.getToken());
+ pushQueriesService.deleteMPNSToken(t.token());
break;
default:
throw new HttpBadRequestException();
@@ -183,15 +183,15 @@ public class Notifications {
@Visitor User visitor,
@RequestBody List<ExternalToken> list) {
list.forEach(t -> {
- switch (t.getType()) {
+ switch (t.type()) {
case "gcm":
- pushQueriesService.addGCMToken(visitor.getUid(), t.getToken());
+ pushQueriesService.addGCMToken(visitor.getUid(), t.token());
break;
case "apns":
- pushQueriesService.addAPNSToken(visitor.getUid(), t.getToken());
+ pushQueriesService.addAPNSToken(visitor.getUid(), t.token());
break;
case "mpns":
- pushQueriesService.addMPNSToken(visitor.getUid(), t.getToken());
+ pushQueriesService.addMPNSToken(visitor.getUid(), t.token());
break;
default:
throw new HttpBadRequestException();