Skip to content

Commit

Permalink
[FIX] 매칭 쿼리 수정 (#107)
Browse files Browse the repository at this point in the history
* fix: 매칭 쿼리 in 대신 eq로 적용

resolve #106

* refactor(WebConfig): 테스트 로그인 가능하도록 엔드포인트 수정
  • Loading branch information
Profile-exe authored Jul 25, 2024
1 parent 58daacc commit 0646bc6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions src/main/java/econo/buddybridge/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public void addInterceptors(InterceptorRegistry registry) {
.addPathPatterns("/**")
.excludePathPatterns(
"/api/oauth/login",
"/api/oauth/login/**",
"/api/oauth/logout"
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public MatchingCustomPage findMatchings(Long memberId, Integer size, LocalDateTi
.map(matching1 -> {
ChatMessage lastMessage = queryFactory
.selectFrom(chatMessage)
.where(chatMessage.matching.id.in(matchings.stream().map(Matching::getId).toList()))
.where(chatMessage.matching.id.eq(matching1.getId()))
.orderBy(chatMessage.createdAt.desc())
.limit(1)
.fetchOne();
Expand All @@ -60,10 +60,6 @@ public MatchingCustomPage findMatchings(Long memberId, Integer size, LocalDateTi
.where(member.id.eq(receiverId))
.fetchOne();

if (receiver == null) {
return null;
}

return new MatchingResDto(
matching1.getId(),
matching1.getPost().getPostType(),
Expand Down

0 comments on commit 0646bc6

Please sign in to comment.