Skip to content

Commit

Permalink
Refactor/#34 refactor community related features
Browse files Browse the repository at this point in the history
  • Loading branch information
yunhacandy authored Sep 16, 2024
2 parents 38ba61a + 1cf1018 commit a049bf3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,17 @@ public void registerPost(PostRequest request, Long memberId) throws ImageExcepti
);
}

@Transactional
public List<Post> getPostsByMemberId(Long memberId) {
return postRepository.findByMemberIdAndIsDeletedFalse(memberId);
}

@Transactional
public List<Post> getPostsByCategory(PostCategory category){
return postRepository.findByCategoryAndIsDeletedFalse(category);
}

@Transactional
public List<Post> getAllPostsByCategory() {
return postRepository.findAllByIsDeletedFalse();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public Response<?> registerComment(@Valid @RequestBody ReplyCommentRegisterReque

@Operation(summary = "댓글별 답글 목록 조회", description = "한 댓글내의 답글 목록 조회를 위한 메소드")
@ApiResponse(content = @Content(schema = @Schema(implementation = ReplyCommentListResponse.class)))
@GetMapping("/{commentId}")@ResponseStatus(HttpStatus.OK)
@GetMapping("/{commentId}")
@ResponseStatus(HttpStatus.OK)
public Response<ReplyCommentListResponse> getCommentsByPostId(@PathVariable Long commentId) {
ReplyCommentListResponse replyCommentListResponse = replyCommentService.getReplyCommentsByCommentId(commentId);
return Response.createSuccess("댓글별 답글 목록 조회 완료", replyCommentListResponse);
Expand Down

0 comments on commit a049bf3

Please sign in to comment.