diff options
author | Vitaly Takmazov | 2022-12-21 03:26:49 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2022-12-21 03:26:49 +0300 |
commit | cf437e3004149efe3b65e80d618374eb28cca641 (patch) | |
tree | 328147d3209d9a4330c1576c9acb4c2b6cc358b6 /src/main/java/com/juick/www | |
parent | 1ad1b73a7b85e7e907de1870991a8849487f9543 (diff) |
external tokens: adopt records
Diffstat (limited to 'src/main/java/com/juick/www')
-rw-r--r-- | src/main/java/com/juick/www/api/Notifications.java | 24 |
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(); |