diff options
Diffstat (limited to 'src/java/com/juick/api/Messages.java')
-rw-r--r-- | src/java/com/juick/api/Messages.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/java/com/juick/api/Messages.java b/src/java/com/juick/api/Messages.java index 5ecf503f..3aeede68 100644 --- a/src/java/com/juick/api/Messages.java +++ b/src/java/com/juick/api/Messages.java @@ -36,4 +36,14 @@ public class Messages { response.sendError(404); } } + + public void doSetPopular(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + int mid = Utils.parseInt(request.getParameter("mid"), 0); + int popular = Utils.parseInt(request.getParameter("popular"), 0); + + if (mid > 0) { + MessagesQueries.setMessagePopular(sql, mid, popular); + Main.replyJSON(request, response, "{\"status\":\"ok\"}"); + } + } } |