diff options
author | Vitaly Takmazov | 2016-11-23 12:08:45 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-23 12:08:45 +0300 |
commit | 42718787291bed507caf4f7ae13f6c41f9b8d7ff (patch) | |
tree | 2ba7bb057a6a740e98c5f4d6dae813af1a6b977f /juick-api/src/main/java/com/juick/api/Subscriptions.java | |
parent | aa3c1a06ed46f49b617e2956b6cf9a1b0d367fb0 (diff) |
using HttpServletResponse status codes
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/Subscriptions.java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/Subscriptions.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/juick-api/src/main/java/com/juick/api/Subscriptions.java b/juick-api/src/main/java/com/juick/api/Subscriptions.java index f8bd162f..126832a9 100644 --- a/juick-api/src/main/java/com/juick/api/Subscriptions.java +++ b/juick-api/src/main/java/com/juick/api/Subscriptions.java @@ -27,7 +27,7 @@ public class Subscriptions { public void doGet(HttpServletRequest request, HttpServletResponse response, int vuid) throws IOException { User visitor = UserQueries.getUserByUID(jdbc, vuid).orElse(new User()); if ((visitor.getUid() == 0) && !(visitor.getName().equals("juick"))) { - response.sendError(403); + response.sendError(HttpServletResponse.SC_FORBIDDEN); return; } int uid = NumberUtils.toInt(request.getParameter("uid"), 0); @@ -43,6 +43,6 @@ public class Subscriptions { Main.replyJSON(request, response, userSerializer.serializeList(users)); } } - response.sendError(400); + response.sendError(HttpServletResponse.SC_BAD_REQUEST); } } |