From 118464cfdabdad2b943e959e14ceb3012642a301 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 18 Jan 2023 11:39:05 +0300 Subject: Drop unused `useroptions` table --- src/main/java/com/juick/www/controllers/Settings.java | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'src/main/java/com/juick/www/controllers') diff --git a/src/main/java/com/juick/www/controllers/Settings.java b/src/main/java/com/juick/www/controllers/Settings.java index a6d036db..d95b21b7 100644 --- a/src/main/java/com/juick/www/controllers/Settings.java +++ b/src/main/java/com/juick/www/controllers/Settings.java @@ -25,11 +25,9 @@ import java.util.stream.IntStream; import javax.inject.Inject; -import com.juick.model.NotifyOpts; import com.juick.model.User; import com.juick.service.EmailService; import com.juick.service.StorageService; -import com.juick.service.SubscriptionService; import com.juick.service.TagService; import com.juick.service.TelegramService; import com.juick.service.UserService; @@ -57,7 +55,6 @@ import org.springframework.context.ApplicationEventPublisher; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.multipart.MultipartFile; @@ -75,8 +72,6 @@ public class Settings { @Inject private UserService userService; @Inject - private SubscriptionService subscriptionService; - @Inject private EmailService emailService; @Inject private TelegramService telegramService; @@ -111,7 +106,6 @@ public class Settings { 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")) { if (emailService.verifyAddressByCode(visitor.getUid(), code)) { @@ -151,15 +145,6 @@ public class Settings { response.addCookie(c); } break; - case "main": - NotifyOpts opts = new NotifyOpts(); - opts.setRepliesEnabled(StringUtils.isNotEmpty(request.getParameter("jnotify"))); - opts.setSubscriptionsEnabled(StringUtils.isNotEmpty(request.getParameter("subscr_notify"))); - opts.setRecommendationsEnabled(StringUtils.isNotEmpty(request.getParameter("recomm"))); - if (subscriptionService.setNotifyOptions(visitor, opts)) { - result = "
Notification options has been updated
"; - } - break; case "about": visitor.setFullName(request.getParameter("fullname")); visitor.setCountry(request.getParameter("country")); -- cgit v1.2.3