aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/juick/api/Main.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/main/java/com/juick/api/Main.java b/src/main/java/com/juick/api/Main.java
index 7d5c8f1b..7a571fe0 100644
--- a/src/main/java/com/juick/api/Main.java
+++ b/src/main/java/com/juick/api/Main.java
@@ -128,10 +128,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
}
String uri = request.getRequestURI();
- if (uri.equals("/tlgmbtwbhk")) {
- tgb.doPost(request, response);
- return;
- }
+
int vuid = Utils.getHttpAuthUID(jdbc, request);
if (vuid == 0) {
vuid = Utils.getVisitorQueryStringUID(jdbc, request);
@@ -192,6 +189,11 @@ public class Main extends HttpServlet implements Stream.StreamListener {
if (request.getCharacterEncoding() == null) {
request.setCharacterEncoding("UTF-8");
}
+ String uri = request.getRequestURI();
+ if (uri.equals("/tlgmbtwbhk")) {
+ tgb.doPost(request, response);
+ return;
+ }
int vuid = Utils.getHttpAuthUID(jdbc, request);
if (vuid == 0) {
@@ -201,8 +203,6 @@ public class Main extends HttpServlet implements Stream.StreamListener {
response.sendError(401);
return;
}
-
- String uri = request.getRequestURI();
switch (uri) {
case "/post":
int mid = Utils.parseInt(request.getParameter("mid"), 0);
@@ -215,9 +215,6 @@ public class Main extends HttpServlet implements Stream.StreamListener {
case "/pm":
pm.doPostPM(request, response, xmpp, vuid);
break;
- case "/tlgmbtwbhk":
- tgb.doPost(request, response);
- break;
default:
response.sendError(405);
break;