aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main
diff options
context:
space:
mode:
authorGravatar Alexander Alexeev2016-11-11 01:48:49 +0700
committerGravatar Vitaly Takmazov2016-11-11 17:27:59 +0300
commitc0b9f667e25a9f23ff753c39a0366180a4a758c9 (patch)
tree75ccc2cf7e0e63c942358affb152f6be85312394 /juick-api/src/main
parent6604dc96558028c0095f33eca1852de5e61f8466 (diff)
formatted
Diffstat (limited to 'juick-api/src/main')
-rw-r--r--juick-api/src/main/java/com/juick/api/Messages.java24
1 files changed, 11 insertions, 13 deletions
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<Integer> 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);