diff --git a/src/main/java/de/tum/cit/aet/artemis/communication/web/AnswerMessageResource.java b/src/main/java/de/tum/cit/aet/artemis/communication/web/AnswerMessageResource.java index 2de37b949b39..466837ba8eac 100644 --- a/src/main/java/de/tum/cit/aet/artemis/communication/web/AnswerMessageResource.java +++ b/src/main/java/de/tum/cit/aet/artemis/communication/web/AnswerMessageResource.java @@ -106,6 +106,16 @@ public ResponseEntity deleteAnswerMessage(@PathVariable Long courseId, @Pa return ResponseEntity.ok().build(); } + /** + * GET /communication/courses/{courseId}/answer-messages-source-posts : Retrieve source answer posts by their IDs + * + * @param courseId id of the course the answer posts belong to + * @param answerPostIds list of answer post IDs to retrieve + * @return ResponseEntity with status 200 (OK) containing the list of found answer posts, + * 400 (Bad Request) if the provided list is null or empty, + * or 404 (Not Found) if no matching answer posts are found + * @throws BadRequestAlertException if the provided answer post IDs are null, empty, or belong to a different course + */ @GetMapping("communication/courses/{courseId}/answer-messages-source-posts") @EnforceAtLeastStudentInCourse public ResponseEntity> getSourceAnswerPostsByIds(@PathVariable Long courseId, @RequestParam List answerPostIds) {