Skip to content

Commit

Permalink
Merge pull request #77 from team-JMT/hotfix/fixApiResponse
Browse files Browse the repository at this point in the history
[fix] : 그룹 검색 결과가 없을 때 빈 리스트 반환
  • Loading branch information
myeongju00 authored Mar 16, 2024
2 parents b5461ef + 1494e96 commit 4e64948
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 4e64948

Please sign in to comment.