BackEnd_OS-151 Add several methods in Discussion Questions and Answers#189
Open
gariktepanosian wants to merge 5 commits intomainfrom
Open
BackEnd_OS-151 Add several methods in Discussion Questions and Answers#189gariktepanosian wants to merge 5 commits intomainfrom
gariktepanosian wants to merge 5 commits intomainfrom
Conversation
…or AND create the Mentor answer and add the several methods in Peers answer ADD the peers and mentor answer controller some requests AND write te unit test
|
Kudos, SonarCloud Quality Gate passed!
|
SevakMart
reviewed
May 30, 2023
| answerId, questionId, enrolledCourseId, currentUserEmail) | ||
| .orElseThrow(IllegalArgumentException::new); | ||
| mentorAnswer.setText(request.getText()); | ||
| mentorAnswer.setCreatedDate(Instant.now()); |
Owner
There was a problem hiding this comment.
let's create a new field updated date, not to mix with created date.
SevakMart
reviewed
May 30, 2023
| answerId, questionId, enrolledCourseId, currentUserEmail) | ||
| .orElseThrow(IllegalArgumentException::new); | ||
| peersAnswer.setText(request.getText()); | ||
| peersAnswer.setCreatedDate(Instant.now()); |
Owner
There was a problem hiding this comment.
the same updatedAt field as well
SevakMart
reviewed
May 30, 2023
| description = "Invalid request arguments provided.", | ||
| content = @Content(schema = @Schema(implementation = ResponseMessage.class))) | ||
| }) | ||
| @PutMapping("/{enrolledCourseId}/peers-questions/answers/{questionId}/{answerId}") |
Owner
There was a problem hiding this comment.
the url should be answers/{answerId}
SevakMart
reviewed
May 30, 2023
| description = "Invalid request arguments provided.", | ||
| content = @Content(schema = @Schema(implementation = ResponseMessage.class))) | ||
| }) | ||
| @DeleteMapping("/{enrolledCourseId}/peers-questions/answers/{questionId}/{answerId}") |
SevakMart
reviewed
May 30, 2023
| @@ -38,17 +39,19 @@ | |||
| public class DiscussionForumController { | |||
Owner
There was a problem hiding this comment.
isn't it possible to delete and update answers using only question and answer ids ?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.










…or AND create the Mentor answer and add the several methods in Peers answer
ADD the peers and mentor to answer the controller some requests AND write the unit test