From aa144cf6b8ca6a0f83c68b30bdecc4c8d32862db Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sun, 5 Aug 2018 18:31:13 +0300 Subject: text/xml for rss --- juick-server/src/main/java/com/juick/server/api/rss/Feeds.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/juick-server/src/main/java/com/juick/server/api/rss/Feeds.java b/juick-server/src/main/java/com/juick/server/api/rss/Feeds.java index ebf5b04e..c72f3a5e 100644 --- a/juick-server/src/main/java/com/juick/server/api/rss/Feeds.java +++ b/juick-server/src/main/java/com/juick/server/api/rss/Feeds.java @@ -43,7 +43,7 @@ public class Feeds { @Inject private UserService userService; - @RequestMapping(value = "/rss/{userName}/blog", method = RequestMethod.GET) + @RequestMapping(value = "/rss/{userName}/blog", method = RequestMethod.GET, produces = "text/xml; charset=utf-8") public ModelAndView getBlog(@PathVariable String userName) { User user = userService.getUserByName(userName); if (!user.isAnonymous()) { @@ -57,7 +57,7 @@ public class Feeds { throw new HttpBadRequestException(); } - @RequestMapping(value = "/rss/", method = RequestMethod.GET) + @RequestMapping(value = "/rss/", method = RequestMethod.GET, produces = "text/xml; charset=utf-8") public ModelAndView getLast(@RequestParam(value = "hours", required = false, defaultValue = "0") Integer hours) { List mids = messagesService.getLastMessages(hours); ModelAndView modelAndView = new ModelAndView(); @@ -65,7 +65,7 @@ public class Feeds { modelAndView.addObject("messages", messagesService.getMessages(UserUtils.getCurrentUser(),mids)); return modelAndView; } - @RequestMapping(value = "/rss/comments", method = RequestMethod.GET) + @RequestMapping(value = "/rss/comments", method = RequestMethod.GET, produces = "text/xml; charset=utf-8") public ModelAndView getLastReplies(@RequestParam(value = "hours", required = false, defaultValue = "0") Integer hours) { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("repliesView"); -- cgit v1.2.3