-
Notifications
You must be signed in to change notification settings - Fork 0
Added: Comment-Service, Logging, Mongo persistence API logic. #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added: Comment-Service, Logging, Mongo persistence API logic. #9
Conversation
@vaybhavshaw @ManishKumarKeshri Take a look. |
src/main/java/TechVault/services/comments/controller/CommentController.java
Outdated
Show resolved
Hide resolved
src/main/java/TechVault/services/comments/controller/CommentController.java
Outdated
Show resolved
Hide resolved
src/main/java/TechVault/services/comments/model/CommentResponse.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments.
src/main/java/TechVault/services/comments/persistance/CommentDaoImpl.java
Outdated
Show resolved
Hide resolved
Done. |
* @return A Response entity which will have all the user details. | ||
*/ | ||
@RequestMapping(method = RequestMethod.POST, value = "/postComment", produces = MediaType.APPLICATION_JSON_VALUE) | ||
public ResponseEntity<?> postComment(@RequestBody String commentJson) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it be immediately reflected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think No. But we will have to look into that logic.
Change log description
Added code for posting (single) comment.
Purpose of the change
Partially fixes #8
What the code does
The following request has been tested locally to return 200 OK null response and verified the entry in DB.
http://localhost:8080/comment/postComment
How to verify it
CI Build shall pass.
Testing via API call :
curl -H "Content-Type: application/json" -X POST --data '{"comment":"This is test comment","parentCommentId":"","userName": "prateek","contentId":"c160d3e029104224aab7db09f91633c1"}' http://localhost:8080/comment/postComment