From 6066406a08d0e1e1d8c64fc0fb4ecdeb80017417 Mon Sep 17 00:00:00 2001 From: Massimiliano Assante Date: Thu, 2 Feb 2023 20:18:14 +0100 Subject: [PATCH] fixed bug --- .../portal/social/networking/ws/methods/v2/Comments.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Comments.java b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Comments.java index cab47ee..212d970 100644 --- a/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Comments.java +++ b/src/main/java/org/gcube/portal/social/networking/ws/methods/v2/Comments.java @@ -179,7 +179,7 @@ public class Comments { @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @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) }) public Response writeComment( @@ -235,7 +235,9 @@ public class Comments { try { result = CassandraConnection.getInstance().getDatabookStore().addComment(theComment); + logger.debug("Added comment? " + comment.toString() + " Result is " +result); } catch(Exception e){ + e.printStackTrace(); responseBean.setMessage("Could not reach the DB to write the comment, something went wrong"); responseBean.setSuccess(false); status = Status.INTERNAL_SERVER_ERROR;