Skip to content

Commit

Permalink
fix: 모든 답변조회시 카테고리 필터링 기능 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jihyo-j committed May 13, 2024
1 parent 7edd025 commit 3afdec2
Show file tree
Hide file tree
Showing 11 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ public ResponseEntity<Void> updateAnswerReactions(@PathVariable Long answerId,
answerService.updateReactionCounts(answerId, heartCount, curiousCount, sadCount);
return ResponseEntity.ok().build();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ public static AnswerCreateRequest of(Long questionId, String content, List<Strin
return new AnswerCreateRequest(questionId, content, linkAttachments, musicName, musicSinger,
musicAudioUrl);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ public static AnswerDetailResponse of(Long answerId, Long questionId, String que
musicSinger, musicAudioUrl, imageUrls, createdDate,
heartCount, curiousCount, sadCount, fcmtoken);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ public static AnswerResponse of(Answer answer) {
return response;
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,3 @@ public static Answer of(Long id, Question question, Category category, Member me
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ public enum AnswerError implements ErrorCode {
private final HttpStatus httpStatus;
private final String errorCode;
private final String message;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ public interface AnswerJpaRepository extends JpaRepository<Answer, Long> {
Page<Answer> findAllByMemberIdAndCategory(Long memberId, Category category, Pageable pageable);

List<Answer> findByMemberId(Long memberId);

}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ public AnswerDetailResponse toDomain(Answer answer, String fcmtoken) {
fcmtoken
);
}

public AnswerResponse toResponse(Answer answer) {
return AnswerResponse.of(answer);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ public interface AnswerRepository {
Page<Answer> findAllByMemberIdAndCategory(Long memberId, Category category, Pageable pageable);

void delete(Answer answer);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,4 @@ public void delete(Answer answer) {
jpaRepository.delete(answer);
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -125,4 +125,4 @@ public void updateReactionCounts(Long answerId, int heartCount, int curiousCount
answerRepository.save(answer);
}

}
}

0 comments on commit 3afdec2

Please sign in to comment.