aboutsummaryrefslogtreecommitdiff
path: root/src/java/com/juick/http/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/juick/http/www/Main.java')
-rw-r--r--src/java/com/juick/http/www/Main.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/java/com/juick/http/www/Main.java b/src/java/com/juick/http/www/Main.java
index 26655897..18c7b8aa 100644
--- a/src/java/com/juick/http/www/Main.java
+++ b/src/java/com/juick/http/www/Main.java
@@ -131,12 +131,18 @@ public class Main extends HttpServlet {
} else {
login.doGetLogin(sql, request, response);
}
- } else if (uri.equals("/pm")) {
+ } else if (uri.startsWith("/pm/")) {
com.juick.User visitor = Utils.getVisitorUser(sql, request, response);
if (visitor == null) {
login.doGetLoginForm(sql, request, response);
} else {
- pm.doGet(sql, request, response, visitor);
+ if (uri.equals("/pm/inbox")) {
+ pm.doGetInbox(sql, request, response, visitor);
+ } else if (uri.equals("/pm/sent")) {
+ pm.doGetSent(sql, request, response, visitor);
+ } else {
+ response.sendError(404);
+ }
}
} else if (uri.equals("/logout")) {
login.doGetLogout(sql, request, response);
@@ -235,6 +241,7 @@ public class Main extends HttpServlet {
String uri = request.getRequestURI();
if (uri.equals("/post")) {
pagesNewMessage.doPostNewMessage(sql, request, response);
+ } else if (uri.equals("/pm/send")) {
} else if (uri.equals("/login")) {
login.doPostLogin(sql, request, response);
} else if (uri.equals("/signup")) {