fixed bug
This commit is contained in:
parent
bffac60eb1
commit
6066406a08
|
@ -179,7 +179,7 @@ public class Comments {
|
||||||
@Consumes(MediaType.APPLICATION_JSON)
|
@Consumes(MediaType.APPLICATION_JSON)
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@StatusCodes ({
|
@StatusCodes ({
|
||||||
@ResponseCode ( code = 201, condition = "Successfull created, the new post is reported in the 'result' field of the returned object"),
|
@ResponseCode ( code = 201, condition = "Successfull created, the new comment is reported in the 'result' field of the returned object"),
|
||||||
@ResponseCode ( code = 500, condition = ErrorMessages.ERROR_IN_API_RESULT)
|
@ResponseCode ( code = 500, condition = ErrorMessages.ERROR_IN_API_RESULT)
|
||||||
})
|
})
|
||||||
public Response writeComment(
|
public Response writeComment(
|
||||||
|
@ -235,7 +235,9 @@ public class Comments {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
result = CassandraConnection.getInstance().getDatabookStore().addComment(theComment);
|
result = CassandraConnection.getInstance().getDatabookStore().addComment(theComment);
|
||||||
|
logger.debug("Added comment? " + comment.toString() + " Result is " +result);
|
||||||
} catch(Exception e){
|
} catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
responseBean.setMessage("Could not reach the DB to write the comment, something went wrong");
|
responseBean.setMessage("Could not reach the DB to write the comment, something went wrong");
|
||||||
responseBean.setSuccess(false);
|
responseBean.setSuccess(false);
|
||||||
status = Status.INTERNAL_SERVER_ERROR;
|
status = Status.INTERNAL_SERVER_ERROR;
|
||||||
|
|
Loading…
Reference in New Issue