aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/www/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/www/controllers')
-rw-r--r--juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java4
-rw-r--r--juick-server/src/main/java/com/juick/server/www/controllers/Settings.java6
-rw-r--r--juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java10
3 files changed, 9 insertions, 11 deletions
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java b/juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java
index 9e364ff8..c476e5c2 100644
--- a/juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java
+++ b/juick-server/src/main/java/com/juick/server/www/controllers/NewMessage.java
@@ -19,8 +19,8 @@ package com.juick.server.www.controllers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.juick.Message;
import com.juick.User;
-import com.juick.server.helpers.AnonymousUser;
-import com.juick.server.helpers.CommandResult;
+import com.juick.model.AnonymousUser;
+import com.juick.model.CommandResult;
import com.juick.server.util.*;
import com.juick.server.www.WebApp;
import com.juick.service.*;
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/Settings.java b/juick-server/src/main/java/com/juick/server/www/controllers/Settings.java
index f2ecccf6..6405b3bd 100644
--- a/juick-server/src/main/java/com/juick/server/www/controllers/Settings.java
+++ b/juick-server/src/main/java/com/juick/server/www/controllers/Settings.java
@@ -16,8 +16,8 @@
*/
package com.juick.server.www.controllers;
-import com.juick.server.helpers.NotifyOpts;
-import com.juick.server.helpers.UserInfo;
+import com.juick.model.NotifyOpts;
+import com.juick.model.UserInfo;
import com.juick.server.util.*;
import com.juick.service.*;
import org.apache.commons.lang3.RandomStringUtils;
@@ -25,7 +25,6 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
-import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
@@ -45,7 +44,6 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Arrays;
-import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.IntStream;
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java b/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java
index 93d3946a..3cea3e34 100644
--- a/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java
+++ b/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java
@@ -24,7 +24,7 @@ import com.github.scribejava.core.builder.ServiceBuilder;
import com.github.scribejava.core.model.*;
import com.github.scribejava.core.oauth.OAuth10aService;
import com.github.scribejava.core.oauth.OAuth20Service;
-import com.juick.facebook.User;
+import com.juick.model.facebook.User;
import com.juick.server.util.HttpBadRequestException;
import com.juick.server.util.UserUtils;
import com.juick.service.CrosspostService;
@@ -32,7 +32,7 @@ import com.juick.service.EmailService;
import com.juick.service.TelegramService;
import com.juick.service.UserService;
import com.juick.server.www.Utils;
-import com.juick.vk.UsersResponse;
+import com.juick.model.vk.UsersResponse;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.HmacAlgorithms;
import org.apache.commons.codec.digest.HmacUtils;
@@ -216,8 +216,8 @@ public class SocialLogin {
OAuth1AccessToken accessToken = oAuthService.getAccessToken(requestToken, verifier);
OAuthRequest oAuthRequest = new OAuthRequest(Verb.GET, TWITTER_VERIFY_URL);
oAuthService.signRequest(accessToken, oAuthRequest);
- com.juick.twitter.User twitterUser = jsonMapper.readValue(oAuthService.execute(oAuthRequest).getBody(),
- com.juick.twitter.User.class);
+ com.juick.model.twitter.User twitterUser = jsonMapper.readValue(oAuthService.execute(oAuthRequest).getBody(),
+ com.juick.model.twitter.User.class);
if (userService.linkTwitterAccount(user, accessToken.getToken(), accessToken.getTokenSecret(),
twitterUser.getScreenName())) {
response.setStatus(HttpServletResponse.SC_FOUND);
@@ -265,7 +265,7 @@ public class SocialLogin {
vkService.signRequest(token, meRequest);
String graph = vkService.execute(meRequest).getBody();
- com.juick.vk.User jsonUser = jsonMapper.readValue(graph, UsersResponse.class).getUsers().get(0);
+ com.juick.model.vk.User jsonUser = jsonMapper.readValue(graph, UsersResponse.class).getUsers().get(0);
String vkName = jsonUser.getFirstName() + " " + jsonUser.getLastName();
String vkLink = jsonUser.getScreenName();