aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-api/src/main/java/com/juick')
-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);