diff options
Diffstat (limited to 'juick-api/src/main/java/com/juick/api/Notifications.java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/Notifications.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/juick-api/src/main/java/com/juick/api/Notifications.java b/juick-api/src/main/java/com/juick/api/Notifications.java index 707df6e4..dbd128b0 100644 --- a/juick-api/src/main/java/com/juick/api/Notifications.java +++ b/juick-api/src/main/java/com/juick/api/Notifications.java @@ -33,7 +33,7 @@ public class Notifications { 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; } String type = request.getParameter("type"); @@ -54,7 +54,7 @@ public class Notifications { Main.replyJSON(request, response, mapper.writeValueAsString(mpnsTokens)); break; default: - response.sendError(400); + response.sendError(HttpServletResponse.SC_BAD_REQUEST); } } else { @@ -84,11 +84,11 @@ public class Notifications { Main.replyJSON(request, response, mapper.writeValueAsString(mpnsTokens)); break; default: - response.sendError(400); + response.sendError(HttpServletResponse.SC_BAD_REQUEST); } } } else { - response.sendError(400); + response.sendError(HttpServletResponse.SC_BAD_REQUEST); } } } @@ -96,7 +96,7 @@ public class Notifications { public void doDelete(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; } ObjectMapper mapper = new ObjectMapper(); |