diff options
author | 2018-03-14 10:04:40 +0300 | |
---|---|---|
committer | 2018-03-14 10:04:40 +0300 | |
commit | b2f3afebc7de684d1d49042f5f79a9cbf9c1f2f2 (patch) | |
tree | b7d5c7ca5b728751fa16d0085486b305da87d61d /juick-server-core | |
parent | b1e8980ed1460340fe4e8db2ce0d7ee1d213854a (diff) |
refactor email settings
Diffstat (limited to 'juick-server-core')
3 files changed, 1 insertions, 44 deletions
diff --git a/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java b/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java deleted file mode 100644 index b8af8f88..00000000 --- a/juick-server-core/src/main/java/com/juick/server/helpers/EmailOpts.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (C) 2008-2017, Juick - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -package com.juick.server.helpers; - -import org.apache.commons.lang3.StringUtils; - -/** - * Created by vitalyster on 09.02.2016. - */ -public class EmailOpts { - private String email; - private String subscriptionHour; - - public EmailOpts(String email, int subscriptionHour) { - this.email = email; - this.subscriptionHour = StringUtils.leftPad(String.format("%d", subscriptionHour), 2, "0"); - } - - public String getSubscriptionHour() { - return subscriptionHour; - } - - public String getEmail() { - return email; - } -}
\ No newline at end of file diff --git a/juick-server-core/src/main/java/com/juick/service/EmailService.java b/juick-server-core/src/main/java/com/juick/service/EmailService.java index ac63f4da..2440bcb4 100644 --- a/juick-server-core/src/main/java/com/juick/service/EmailService.java +++ b/juick-server-core/src/main/java/com/juick/service/EmailService.java @@ -27,6 +27,7 @@ public interface EmailService { boolean addVerificationCode(Integer userId, String account, String code); boolean addEmail(Integer userId, String email); boolean deleteEmail(Integer userId, String account); + String getNotificationsEmail(Integer userId); boolean setNotificationsEmail(Integer userId, String account); List<String> getEmails(Integer userId, boolean active); } diff --git a/juick-server-core/src/main/java/com/juick/service/UserService.java b/juick-server-core/src/main/java/com/juick/service/UserService.java index 6ca6fb98..115c7dfc 100644 --- a/juick-server-core/src/main/java/com/juick/service/UserService.java +++ b/juick-server-core/src/main/java/com/juick/service/UserService.java @@ -19,7 +19,6 @@ package com.juick.service; import com.juick.User; import com.juick.server.helpers.Auth; -import com.juick.server.helpers.EmailOpts; import com.juick.server.helpers.UserInfo; import java.util.Collection; @@ -123,8 +122,6 @@ public interface UserService { List<String> getEmails(User user); - EmailOpts getEmailOpts(User user); - String getEmailHash(User user); int deleteLoginForUser(String name); |