aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/www/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-11-07 22:17:36 +0300
committerGravatar Vitaly Takmazov2023-11-07 22:17:36 +0300
commitdfad691d92d55d8b458665ca7b810d4fae2d3089 (patch)
treec4ed19ffb08c7dfb39f03a4effbc24cf7b242479 /src/main/java/com/juick/www/api
parent7e59414c9557a888fad889ee0e76e694b23c2416 (diff)
Add logging for notifications registrations
Diffstat (limited to 'src/main/java/com/juick/www/api')
-rw-r--r--src/main/java/com/juick/www/api/Notifications.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/juick/www/api/Notifications.java b/src/main/java/com/juick/www/api/Notifications.java
index df2fb507..c1ee74ab 100644
--- a/src/main/java/com/juick/www/api/Notifications.java
+++ b/src/main/java/com/juick/www/api/Notifications.java
@@ -135,8 +135,10 @@ public class Notifications {
@RequestBody List<ExternalToken> list) {
var userTokens = collectTokens(visitor.getUid());
list.forEach(t -> {
+ logger.debug("Received new token from {}: type {} token {}", visitor.getName(), t.type(), t.token());
if (userTokens.getTokens().stream().noneMatch(existing -> existing.token().equals(t.token()))) {
- userService.addToken(visitor.getUid(), t.type(), t.token());
+ var added = userService.addToken(visitor.getUid(), t.type(), t.token());
+ logger.debug("Token added: {}", added);
}
});
return Status.OK;