Skip to content

Commit

Permalink
Hotfix: 로그인 안한 유저가 키워드 검색할 경우 분기처리
Browse files Browse the repository at this point in the history
  • Loading branch information
rrosiee committed Sep 26, 2024
1 parent 92183b9 commit 664aa28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public ResponseEntity<CulturalEventDetailListDto> getCulturalEventList(
Member member = memberJwtService.getMember();

// Save Search Keyword
if (keyword != null) {
if (keyword != null && member != null) {
culturalEventSearchKeywordService.createCulturalEventSearchKeyword(member, keyword);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class CulturalEventSearchKeywordService {
public void createCulturalEventSearchKeyword(Member member, String keyword) {
Optional<CulturalEventSearchKeyword> culturalEventSearchKeywordOptional = culturalEventSearchKeywordRepository.findFirstByMemberAndKeywordAndIsRecentTrue(member, keyword);

if (culturalEventSearchKeywordOptional.isEmpty()) {
if (!culturalEventSearchKeywordOptional.isPresent()) {
CulturalEventSearchKeyword culturalEventSearchKeyword = CulturalEventSearchKeyword.builder()
.keyword(keyword).build();
culturalEventSearchKeyword.setMember(member);
Expand Down

0 comments on commit 664aa28

Please sign in to comment.