Skip to content

Commit

Permalink
[#168] fix(북마크 추가 관련)
Browse files Browse the repository at this point in the history
- 북마크가 추가될 때, 동일한 url을 가진 북마크가 휴지통에 있을 경우, 확실한 오류사항을 인지할 수 있도록 exception 발생시킴.
  • Loading branch information
Ji-Ha committed Jul 24, 2022
1 parent 1f19068 commit e390fa0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class BookmarkService(
val bookmarkList = bookmarkRepository.findAllByFolderId(folderId)

for (savedBookmark in bookmarkList) {
if (savedBookmark.link == bookmark.link) throw SameBookmarkException()
if (savedBookmark.link == bookmark.link) {
if(savedBookmark.deleted) throw RuntimeException("휴지통에 존재하는 북마크와 url이 동일합니다!")
throw SameBookmarkException()
}
}
}

Expand Down

0 comments on commit e390fa0

Please sign in to comment.