diff --git a/src/main/java/de/thm/arsnova/controller/FoodVoteController.java b/src/main/java/de/thm/arsnova/controller/FoodVoteController.java index 0f2772d183829e4df8b18a75a32676404533c28a..61269ef5a9b1163fdae90064536d100021be6982 100644 --- a/src/main/java/de/thm/arsnova/controller/FoodVoteController.java +++ b/src/main/java/de/thm/arsnova/controller/FoodVoteController.java @@ -37,6 +37,7 @@ import de.thm.arsnova.entities.FoodVote; import de.thm.arsnova.services.IFoodService; @Controller +@RequestMapping("/canteen/menu/vote") public class FoodVoteController extends AbstractController { public static final Logger LOGGER = LoggerFactory @@ -45,7 +46,7 @@ public class FoodVoteController extends AbstractController { @Autowired private IFoodService foodService; - @RequestMapping(value = "/canteen/menu/vote", method = RequestMethod.POST) + @RequestMapping(value = "/", method = RequestMethod.POST) public final void setFoodVote( @RequestBody final Object menu, final HttpServletResponse response @@ -54,13 +55,13 @@ public class FoodVoteController extends AbstractController { foodService.vote(menustring); } - @RequestMapping(value = "/canteen/menu/vote", method = RequestMethod.GET) + @RequestMapping(value = "/", method = RequestMethod.GET) @ResponseBody public final List<FoodVote> getFoodVote() { return foodService.getFoodVote(); } - @RequestMapping(value = "/canteen/menu/vote/count", method = RequestMethod.GET, produces = "text/plain") + @RequestMapping(value = "/count", method = RequestMethod.GET, produces = "text/plain") @ResponseBody public final String getFoodVoteCount() { return Integer.toString(foodService.getFoodVoteCount()); diff --git a/src/main/java/de/thm/arsnova/controller/StatisticsController.java b/src/main/java/de/thm/arsnova/controller/StatisticsController.java index e6da103370dc519c389a6f48802c6c500f1c6006..09317972b4ba8c5d66eab1eeee1d40c70867ed2e 100644 --- a/src/main/java/de/thm/arsnova/controller/StatisticsController.java +++ b/src/main/java/de/thm/arsnova/controller/StatisticsController.java @@ -10,24 +10,25 @@ import de.thm.arsnova.entities.Statistics; import de.thm.arsnova.services.IStatisticsService; @Controller +@RequestMapping("/statistics") public class StatisticsController { @Autowired private IStatisticsService statisticsService; - @RequestMapping(method = RequestMethod.GET, value = "/statistics") + @RequestMapping(method = RequestMethod.GET, value = "/") @ResponseBody public final Statistics getStatistics() { return statisticsService.getStatistics(); } - @RequestMapping(method = RequestMethod.GET, value = "/statistics/activeusercount", produces = "text/plain") + @RequestMapping(method = RequestMethod.GET, value = "/activeusercount", produces = "text/plain") @ResponseBody public final String countActiveUsers() { return Integer.toString(statisticsService.countActiveUsers()); } - @RequestMapping(method = RequestMethod.GET, value = "/statistics/sessioncount", produces = "text/plain") + @RequestMapping(method = RequestMethod.GET, value = "/sessioncount", produces = "text/plain") @ResponseBody public final String countSessions() { return Integer.toString(statisticsService.getStatistics().getOpenSessions()