Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
Feat: 0이하의 페이지 요청 시 빈 값 반환
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhyun1 committed Nov 27, 2023
1 parent 041c174 commit e8978e6
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import ybe.mini.travelserver.domain.accommodation.repository.AccommodationRepository;
import ybe.mini.travelserver.global.api.TourAPIService;

import java.util.Collections;
import java.util.List;
import java.util.Objects;

Expand All @@ -25,6 +26,10 @@ public List<AccommodationGetResponse> bringAccommodations(
int pageNo, int numOfRows,
String keyword, AreaCode areaCode
) {
if (pageNo <= 0) {
return Collections.emptyList();
}

String areaCodeString = (areaCode != null) ? String.valueOf(areaCode.getCode()) : null;

List<Accommodation> accommodations =
Expand Down

0 comments on commit e8978e6

Please sign in to comment.