Skip to content

Commit

Permalink
fix : scrap된 post가 없을 때 빈 리스트가 반환되도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
YongGoose committed Nov 12, 2023
1 parent 3f4cd20 commit 6509286
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/main/java/WithYou/domain/scrap/service/ScrapService.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import WithYou.domain.scrap.entity.Scrap;
import WithYou.domain.scrap.exception.ContentNotFoundException;
import WithYou.domain.scrap.exception.PostExistException;
import WithYou.domain.scrap.exception.PostScrapNotFoundException;
import WithYou.domain.scrap.repository.ScrapQueryRepository;
import WithYou.domain.scrap.repository.ScrapRepository;
import java.util.List;
Expand Down Expand Up @@ -78,9 +77,6 @@ private Scrap makeScrapObject(Post post, Member member) {

public List<Scrap> findScrapByMemberId(Member member) {
List<Scrap> scrapList = scrapQueryRepository.findScrapByMemberIdOrderByIdDESC(member);
if (scrapList.isEmpty()) {
throw new PostScrapNotFoundException();
}
return scrapList;
}

Expand Down

0 comments on commit 6509286

Please sign in to comment.