diff options
author | Vitaly Takmazov | 2021-10-18 00:40:10 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2021-10-18 02:10:01 +0300 |
commit | a2348e95bbacbc9a9961afcabb7bbe82f3c7fe9d (patch) | |
tree | 7c794eba8ce72e6533a818fcbfb3c8f87e36d2f8 /src/main/java/com/juick/www/controllers/Settings.java | |
parent | 6c82f3dea2c56e8d62bd2f154e2e701f96454418 (diff) |
Display error for social login
* CrossPostService gone
Diffstat (limited to 'src/main/java/com/juick/www/controllers/Settings.java')
-rw-r--r-- | src/main/java/com/juick/www/controllers/Settings.java | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java index a9240cab..50b4ea14 100644 --- a/src/main/java/com/juick/www/controllers/Settings.java +++ b/src/main/java/com/juick/www/controllers/Settings.java @@ -70,8 +70,6 @@ public class Settings { @Inject private UserService userService; @Inject - private CrosspostService crosspostService; - @Inject private SubscriptionService subscriptionService; @Inject private EmailService emailService; @@ -111,9 +109,9 @@ public class Settings { List<String> hours = IntStream.rangeClosed(0, 23).boxed() .map(i -> StringUtils.leftPad(String.format("%d", i), 2, "0")).collect(Collectors.toList()); model.addAttribute("hours", hours); - model.addAttribute("fbstatus", crosspostService.getFbCrossPostStatus(visitor.getUid())); - model.addAttribute("twitter_name", crosspostService.getTwitterName(visitor.getUid())); - model.addAttribute("telegram_name", crosspostService.getTelegramName(visitor.getUid())); + model.addAttribute("fbstatus", userService.getFbCrossPostStatus(visitor.getUid())); + model.addAttribute("twitter_name", userService.getTwitterName(visitor.getUid())); + model.addAttribute("telegram_name", userService.getTelegramName(visitor.getUid())); model.addAttribute("notify_options", subscriptionService.getNotifyOptions(visitor)); model.addAttribute("userinfo", userService.getUserInfo(visitor)); if (page.equals("auth-email")) { @@ -232,7 +230,7 @@ public class Settings { } break; case "twitter-del": - crosspostService.deleteTwitterToken(visitor.getUid()); + userService.deleteTwitterToken(visitor.getUid()); for (Cookie cookie : request.getCookies()) { if (cookie.getName().equals("request_token")) { cookie.setMaxAge(0); @@ -250,15 +248,15 @@ public class Settings { result = "<p><a href=\"/settings\">Back</a></p>"; break; case "facebook-disable": - crosspostService.disableFBCrosspost(visitor.getUid()); + userService.disableFBCrosspost(visitor.getUid()); result = "<p><a href=\"/settings\">Back</a></p>"; break; case "facebook-enable": - crosspostService.enableFBCrosspost(visitor.getUid()); + userService.enableFBCrosspost(visitor.getUid()); result = "<p><a href=\"/settings\">Back</a></p>"; break; case "vk-del": - crosspostService.deleteVKUser(visitor.getUid()); + userService.deleteVKUser(visitor.getUid()); result = "<p><a href=\"/settings\">Back</a></p>"; break; default: |