diff options
author | 2020-03-07 13:20:45 +0300 | |
---|---|---|
committer | 2020-03-07 13:20:45 +0300 | |
commit | c9d67837cbcaae84a03b7bd14e508ca62880f87f (patch) | |
tree | 0f66e38f5b6aa48c66fae7d10c0b8b5ad6f7e7e2 /src/main/java/com/juick/server/www/filters | |
parent | ad50d1090b303d3a71c354dd2922a982fda6a289 (diff) |
Reorganize project layout
Diffstat (limited to 'src/main/java/com/juick/server/www/filters')
-rw-r--r-- | src/main/java/com/juick/server/www/filters/AnythingFilter.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/com/juick/server/www/filters/AnythingFilter.java b/src/main/java/com/juick/server/www/filters/AnythingFilter.java index cf484357..9a012089 100644 --- a/src/main/java/com/juick/server/www/filters/AnythingFilter.java +++ b/src/main/java/com/juick/server/www/filters/AnythingFilter.java @@ -17,6 +17,7 @@ package com.juick.server.www.filters; +import com.juick.model.User; import com.juick.server.util.WebUtils; import com.juick.service.MessagesService; import com.juick.service.UserService; @@ -59,7 +60,7 @@ public class AnythingFilter extends OncePerRequestFilter { if (isPostNumber && anything.equals(Integer.toString(messageId))) { if (messageId > 0) { - com.juick.User author = messagesService.getMessageAuthor(messageId); + User author = messagesService.getMessageAuthor(messageId); if (author != null) { servletResponse.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY); @@ -68,14 +69,14 @@ public class AnythingFilter extends OncePerRequestFilter { } } } - com.juick.User user = userService.getUserByName(anything); + User user = userService.getUserByName(anything); if (user.getUid() > 0) { servletResponse.sendRedirect("/" + user.getName() + "/"); } else { filterChain.doFilter(servletRequest, servletResponse); } } else { - com.juick.User user = userService.getUserByName(anything); + User user = userService.getUserByName(anything); if (!user.isAnonymous()) { servletResponse.sendRedirect("/" + user.getName() + "/?before=" + before); } else { |