diff options
author | Vitaly Takmazov | 2024-09-08 22:38:11 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2024-09-09 00:33:07 +0300 |
commit | b94d06390216d645c61a27b77324a999ff1c11ef (patch) | |
tree | bed05dad9f60567626e4966a04453d8fb5ca92ff /src/main/java/com/juick/www/api/webhooks | |
parent | fccbba79ff9bb8795b94cae7685807cc3d7fcaf8 (diff) |
Clean up social login
Diffstat (limited to 'src/main/java/com/juick/www/api/webhooks')
-rw-r--r-- | src/main/java/com/juick/www/api/webhooks/VkWebhook.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/www/api/webhooks/VkWebhook.java b/src/main/java/com/juick/www/api/webhooks/VkWebhook.java index 45e20d3f..d69d00be 100644 --- a/src/main/java/com/juick/www/api/webhooks/VkWebhook.java +++ b/src/main/java/com/juick/www/api/webhooks/VkWebhook.java @@ -62,9 +62,9 @@ public class VkWebhook { if (secretKey.equals(secret)) { if (type.startsWith("donut_")) { var vkId = json.get("object").get("user_id").asLong(0); - var userId = userService.getUIDbyVKID(vkId); - if (userId > 0) { - vkService.updatePremiumStatus(userId); + var user = userService.getUserByVKID(vkId); + if (user.isPresent()) { + vkService.updatePremiumStatus(user.get().getUid()); } } return "ok"; |