diff options
author | 2018-09-06 13:58:40 +0300 | |
---|---|---|
committer | 2018-09-07 05:15:51 -0400 | |
commit | 670913698776e09b7ff44f44ccdcf56303d79be3 (patch) | |
tree | 96f932645ab0faf9de6861f89072d1eb4b2622a3 /juick-server/src/main/java/com/juick/server/api/Post.java | |
parent | 51489a954463567f8dd50854826c03ce51c45cb3 (diff) |
merge legacy www
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api/Post.java')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/api/Post.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/Post.java b/juick-server/src/main/java/com/juick/server/api/Post.java index b0be50b6..99d118c3 100644 --- a/juick-server/src/main/java/com/juick/server/api/Post.java +++ b/juick-server/src/main/java/com/juick/server/api/Post.java @@ -62,7 +62,7 @@ public class Post { @Inject CommandsManager commandsManager; - @RequestMapping(value = "/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/post", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) @ResponseStatus(value = HttpStatus.OK) public CommandResult doPostMessage( @RequestParam(required = false, defaultValue = StringUtils.EMPTY) String body, @@ -101,7 +101,7 @@ public class Post { return commandsManager.processCommand(visitor, body, attachmentFName); } - @RequestMapping(value = "/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) + @RequestMapping(value = "/api/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE) public com.juick.Message doPostComment( @RequestParam(defaultValue = "0") int mid, @RequestParam(defaultValue = "0") int rid, @@ -154,7 +154,7 @@ public class Post { return commandsManager.processCommand(visitor, String.format("#%d/%d %s", mid, rid, body), attachmentFName).getNewMessage().get(); } - @PostMapping("/like") + @PostMapping("/api/like") @ResponseStatus(value = HttpStatus.OK) public Status doPostRecomm(@RequestParam Integer mid) throws Exception { com.juick.User visitor = UserUtils.getCurrentUser(); @@ -173,13 +173,13 @@ public class Post { return Status.getStatus(status.getText()); } - @GetMapping("/reactions") + @GetMapping("/api/reactions") @ResponseStatus(value = HttpStatus.OK) public List<Reaction> reactionsList() { return messagesService.listReactions(); } - @PostMapping("/react") + @PostMapping("/api/react") @ResponseStatus(value = HttpStatus.OK) public Status doPostReact(@RequestParam Integer mid,@RequestParam @NotNull int reactionId, @RequestParam (required = false, defaultValue = "1") int count) { @@ -204,7 +204,7 @@ public class Post { return recommendStatus == MessagesService.RecommendStatus.Error ? Status.ERROR :Status.OK; } - @PostMapping("/update") + @PostMapping("/api/update") public CommandResult updateMessage(@RequestParam Integer mid, @RequestParam(required = false, defaultValue = "0") Integer rid, @RequestParam String body) { |