Skip to content

Commit

Permalink
[fix] : 그룹 검색 결과가 없을 때 빈 리스트 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
myeongju00 committed Mar 16, 2024
1 parent 859a1ad commit 1494e96
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ public void userSelectGroup(Long groupId, UserInfo user) {
public FindGroupResponse searchByGroupName(String keyword, Pageable pageable) {
Page<GroupEntity> result = groupRepository.findByGroupName(keyword, pageable);
if(result.isEmpty()) {
throw new ApiException(GroupMessage.GROUP_NOT_FOUND);
Page<GroupEntity> page = Page.empty();
return new FindGroupResponse(List.of(), new PageResponse(page));
}
PageResponse pageResponse = new PageResponse(result);
return new FindGroupResponse(
Expand Down

0 comments on commit 1494e96

Please sign in to comment.