diff options
author | Vitaly Takmazov | 2018-09-25 11:53:37 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-25 11:53:37 +0300 |
commit | ae76024011a8442ae7eab953e0b97e9fe2c7c201 (patch) | |
tree | 9ec4bc077ad2db21dcfce0eefa126a484b1d0fc7 /juick-server/src/main/java/com/juick/server/www/controllers | |
parent | 85abc3e201539f81500754a7fb0e4f3a9d148fc4 (diff) |
reorganize layout
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/www/controllers')
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(); |