Skip to content

Commit fd2fb74

Browse files
authored
chore: 회고 생성일 최근이 먼저 보이도록 설정 (#451)
1 parent 04d77a5 commit fd2fb74

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

layer-api/src/main/java/org/layer/domain/retrospect/service/RetrospectService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public RetrospectListGetResponse getRetrospects(Long spaceId, Long memberId) {
129129
Team team = new Team(memberSpaceRelationRepository.findAllBySpaceId(spaceId));
130130
team.validateTeamMembership(memberId);
131131

132-
List<Retrospect> retrospects = retrospectRepository.findAllBySpaceId(spaceId);
132+
List<Retrospect> retrospects = retrospectRepository.findAllBySpaceIdOrderByCreatedAtDesc(spaceId);
133133
List<Long> retrospectIds = retrospects.stream().map(Retrospect::getId).toList();
134134
Answers answers = new Answers(answerRepository.findAllByRetrospectIdIn(retrospectIds));
135135

layer-domain/src/main/java/org/layer/domain/retrospect/repository/RetrospectRepository.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
public interface RetrospectRepository extends JpaRepository<Retrospect, Long> {
2121
List<Retrospect> findAllBySpaceId(Long spaceId);
22+
List<Retrospect> findAllBySpaceIdOrderByCreatedAtDesc(Long spaceId);
2223

2324
List<Retrospect> findAllBySpaceIdIn(List<Long> spaceIds);
2425

0 commit comments

Comments
 (0)