From c0b9f667e25a9f23ff753c39a0366180a4a758c9 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Fri, 11 Nov 2016 01:48:49 +0700 Subject: formatted --- .../src/main/java/com/juick/api/Messages.java | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'juick-api') diff --git a/juick-api/src/main/java/com/juick/api/Messages.java b/juick-api/src/main/java/com/juick/api/Messages.java index d02d0ffe..d9d506f3 100644 --- a/juick-api/src/main/java/com/juick/api/Messages.java +++ b/juick-api/src/main/java/com/juick/api/Messages.java @@ -26,15 +26,13 @@ import java.util.List; import java.util.Objects; /** - * * @author ugnich */ public class Messages { - private static final Logger logger = LoggerFactory.getLogger(Messages.class); JdbcTemplate sql; - + MessageSerializer messageSerializer = new MessageSerializer(); public Messages(JdbcTemplate sql) { @@ -52,16 +50,16 @@ public class Messages { Main.replyJSON(request, response, json); } - public void doGetHome(HttpServletRequest request, - HttpServletResponse response, int vuid) + public void doGetHome(HttpServletRequest request, + HttpServletResponse response, int vuid) throws ServletException, IOException { int before_mid = NumberUtils.toInt(request.getParameter("before_mid"), 0); List mids = MessagesQueries.getMyFeed(sql, vuid, before_mid); feedMessages(request, response, MessagesQueries.getMessages(sql, mids)); } - public void doGet(HttpServletRequest request, - HttpServletResponse response, int vuid) + public void doGet(HttpServletRequest request, + HttpServletResponse response, int vuid) throws ServletException, IOException { int before_mid = NumberUtils.toInt(request.getParameter("before_mid"), 0); String uname = request.getParameter("uname"); @@ -122,8 +120,8 @@ public class Messages { } } - public void doGetRecommended(HttpServletRequest request, - HttpServletResponse response, int vuid) + public void doGetRecommended(HttpServletRequest request, + HttpServletResponse response, int vuid) throws ServletException, IOException { int before_mid = NumberUtils.toInt(request.getParameter("before_mid"), 0); @@ -141,8 +139,8 @@ public class Messages { } } - public void doSetPrivacy(HttpServletRequest request, - HttpServletResponse response, Stream xmpp, int vuid) + public void doSetPrivacy(HttpServletRequest request, + HttpServletResponse response, Stream xmpp, int vuid) throws ServletException, IOException { int mid = NumberUtils.toInt(request.getParameter("mid"), 0); com.juick.User user = MessagesQueries.getMessageAuthor(sql, mid); @@ -153,8 +151,8 @@ public class Messages { } } - public void doSetPopular(HttpServletRequest request, - HttpServletResponse response, Stream xmpp) + public void doSetPopular(HttpServletRequest request, + HttpServletResponse response, Stream xmpp) throws ServletException, IOException { int mid = NumberUtils.toInt(request.getParameter("mid"), 0); int popular = NumberUtils.toInt(request.getParameter("popular"), 0); -- cgit v1.2.3