From 0c2803b09b75b5aac26ad9d1e5061f77bf003d64 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 5 Apr 2017 14:50:48 +0300 Subject: juick-www: GetMapping and PostMapping --- juick-www/src/main/java/com/juick/www/controllers/PM.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'juick-www/src/main/java/com/juick/www/controllers/PM.java') 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()) { -- cgit v1.2.3