aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-25 16:34:56 +0300
committerGravatar Vitaly Takmazov2018-09-25 16:34:56 +0300
commit0d663c5503fdda0da5f7adaef31f67fe673dc6f2 (patch)
treeedf17bc38bd7479f2f05e8008e7bd0a1e26dd0f7 /juick-server/src/main/java/com/juick/server/api
parentf3acdb00caaef60bd5ddfa128699f8a255261543 (diff)
show command results when comment was not created
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/api')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/Post.java6
1 files changed, 3 insertions, 3 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 d6f085bb..b36f324a 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
@@ -102,7 +102,7 @@ public class Post {
}
@RequestMapping(value = "/api/comment", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
- public com.juick.Message doPostComment(
+ public CommandResult doPostComment(
@RequestParam(defaultValue = "0") int mid,
@RequestParam(defaultValue = "0") int rid,
@RequestParam(required = false, defaultValue = StringUtils.EMPTY) String body,
@@ -150,8 +150,8 @@ public class Post {
throw new HttpBadRequestException();
}
}
-
- return commandsManager.processCommand(visitor, String.format("#%d/%d %s", mid, rid, body), attachmentFName).getNewMessage().get();
+ return commandsManager.processCommand(visitor, String.format("#%d/%d %s", mid, rid, body),
+ attachmentFName);
}
@PostMapping("/api/like")