diff options
author | Vitaly Takmazov | 2017-12-25 12:34:28 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-12-25 12:34:28 +0300 |
commit | d767b84a27b6864897bbfbd8c9250550975c5d45 (patch) | |
tree | f05e153262fbbcd52453d5c32026ed6c3a534bba /juick-www/src/main/java/com/juick | |
parent | 8956e7566e2bdc80ecbfdabe9c38bfe05d3e124b (diff) |
email notifications settings
Diffstat (limited to 'juick-www/src/main/java/com/juick')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/Settings.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/Settings.java b/juick-www/src/main/java/com/juick/www/controllers/Settings.java index 64775aec..a2459654 100644 --- a/juick-www/src/main/java/com/juick/www/controllers/Settings.java +++ b/juick-www/src/main/java/com/juick/www/controllers/Settings.java @@ -214,11 +214,9 @@ public class Settings { } break; case "email-subscr": - if (emailService.setSubscriptionHour(visitor.getUid(), request.getParameter("account"), - request.getParameter("time"))) { - result = String.format("<p>Saved! Will send to <strong>%s</strong> at <strong>%s:00 GMT</strong>." + - "</p><p><a href=\"/settings\">Back</a></p>", request.getParameter("account"), - request.getParameter("time")); + if (emailService.setNotificationsEmail(visitor.getUid(), request.getParameter("account"))) { + result = String.format("<p>Saved! Will send notifications to <strong>%s</strong>." + + "</p><p><a href=\"/settings\">Back</a></p>", request.getParameter("account")); } else { result = "<p>Disabled.</p><p><a href=\"/settings\">Back</a></p>"; } |