aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/controllers/PM.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-04-05 14:50:48 +0300
committerGravatar Vitaly Takmazov2017-04-05 14:50:48 +0300
commit0c2803b09b75b5aac26ad9d1e5061f77bf003d64 (patch)
tree4aaff710277d51e80483400a0ebcb47f0e21b7d4 /juick-www/src/main/java/com/juick/www/controllers/PM.java
parent8cad49e82db4847035a84f9de44878d9abe6299c (diff)
juick-www: GetMapping and PostMapping
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/controllers/PM.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/PM.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/PM.java b/juick-www/src/main/java/com/juick/www/controllers/PM.java
index 9cc29129..ab772443 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/PM.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/PM.java
@@ -31,8 +31,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
import rocks.xmpp.addr.Jid;
import rocks.xmpp.core.stanza.model.Message;
@@ -61,7 +61,7 @@ public class PM {
@Inject
WebApp webApp;
- @RequestMapping(value = "/pm/inbox", method = RequestMethod.GET)
+ @GetMapping("/pm/inbox")
protected String doGetInbox(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
com.juick.User visitor = UserUtils.getCurrentUser();
if (visitor.getUid() == 0) {
@@ -78,7 +78,7 @@ public class PM {
return "views/pm_inbox";
}
- @RequestMapping(value = "/pm/sent", method = RequestMethod.GET)
+ @GetMapping("/pm/sent")
protected String doGetSent(HttpServletRequest request, HttpServletResponse response, ModelMap model) {
com.juick.User visitor = UserUtils.getCurrentUser();
if (visitor.getUid() == 0) {
@@ -101,7 +101,7 @@ public class PM {
return "views/pm_sent";
}
- @RequestMapping(value = "/pm/send", method = RequestMethod.POST)
+ @PostMapping("/pm/send")
public void doPostPM(HttpServletRequest request, HttpServletResponse response) throws IOException {
com.juick.User visitor = UserUtils.getCurrentUser();
if (visitor.getUid() == 0 || visitor.isBanned()) {