-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: CountryCode 내부로 검증 로직 이동 * refactor: 통일성을 위해 SearchType 의 from 메소드 수정 * feat: TravelogueCountry 검증 로직 추가 * style: 통일성을 위해 "나라"를 "국가" 로 변경 * feat: 여행기 장소 생성시 국가 코드가 NONE 인지 검증하는 로직 추가 * feat: 여행기 생성 시 국가 코드가 NONE 인 여행기 장소가 생성되지 않는 기능 구현 * feat: 태그 생성 기능 삭제 * sytle: 통일성을 위해 괄호 수정 Co-authored-by: eunjungL <[email protected]> * feat: TravelogueCountry 에 NONE 국가 코드 허용 * feat: 존재하지 않는 국가로 검색 시 빈 여행기 목록을 반환하는 기능 구현 * refactor: 비즈니스 로직을 facade 가 아닌 서비스에서 수행하도록 변경 * test: 존재하지 않는 국가 검색 테스트 코드 추가 --------- Co-authored-by: eunjungL <[email protected]>
- Loading branch information
1 parent
d574795
commit 425166a
Showing
27 changed files
with
374 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 0 additions & 15 deletions
15
backend/src/main/java/kr/touroot/tag/dto/TagCreateRequest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 6 additions & 5 deletions
11
backend/src/main/java/kr/touroot/travelogue/domain/search/SearchType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package kr.touroot.travelogue.domain.search; | ||
|
||
import java.util.Arrays; | ||
import kr.touroot.global.exception.BadRequestException; | ||
|
||
public enum SearchType { | ||
TITLE, AUTHOR, COUNTRY; | ||
|
||
public static SearchType from(String searchType) { | ||
return Arrays.stream(SearchType.values()) | ||
.filter(type -> searchType.equalsIgnoreCase(type.name())) | ||
.findFirst() | ||
.orElseThrow(() -> new IllegalArgumentException("존재하지 않는 검색 키워드 종류입니다.")); | ||
try { | ||
return SearchType.valueOf(searchType.toUpperCase()); | ||
} catch (IllegalArgumentException exception) { | ||
throw new BadRequestException("존재하지 않는 검색 키워드 종류입니다."); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 0 additions & 56 deletions
56
backend/src/test/java/kr/touroot/tag/TagControllerTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.