diff --git a/src/main/kotlin/com/yapp/web2/domain/bookmark/BookmarkDto.kt b/src/main/kotlin/com/yapp/web2/domain/bookmark/BookmarkDto.kt index 4c1c8762..d07308b5 100644 --- a/src/main/kotlin/com/yapp/web2/domain/bookmark/BookmarkDto.kt +++ b/src/main/kotlin/com/yapp/web2/domain/bookmark/BookmarkDto.kt @@ -1,6 +1,5 @@ package com.yapp.web2.domain.bookmark -import com.google.common.collect.ImmutableList import com.yapp.web2.domain.account.entity.Account import com.yapp.web2.domain.bookmark.entity.Bookmark import com.yapp.web2.domain.bookmark.entity.BookmarkInterface @@ -9,7 +8,6 @@ import com.yapp.web2.domain.bookmark.entity.SharedBookmark import com.yapp.web2.domain.folder.entity.Folder import io.swagger.annotations.ApiModel import io.swagger.annotations.ApiModelProperty -import java.time.LocalDateTime import javax.validation.constraints.NotEmpty import javax.validation.constraints.NotNull @@ -19,7 +17,7 @@ class BookmarkDto { fun addBookmarkDtoToPersonalBookmark(bookmarkDto: AddBookmarkDto, account: Account): BookmarkInterface { return PersonalBookmark( account, - bookmarkDto.link, + bookmarkDto.url, bookmarkDto.title, bookmarkDto.image, bookmarkDto.description, @@ -28,13 +26,13 @@ class BookmarkDto { } fun addBookmarkDtoToBookmark(bookmarkDto: AddBookmarkDto, account: Account): Bookmark { - return Bookmark(account, bookmarkDto.link, bookmarkDto.title, bookmarkDto.image, bookmarkDto.description, bookmarkDto.remind) + return Bookmark(account, bookmarkDto.url, bookmarkDto.title, bookmarkDto.image, bookmarkDto.description, bookmarkDto.remind) } fun addBookmarkDtoToSharedBookmark(bookmarkDto: AddBookmarkDto, account: Account, folder: Folder): BookmarkInterface { return SharedBookmark( account, - bookmarkDto.link, + bookmarkDto.url, bookmarkDto.title, bookmarkDto.image, bookmarkDto.description, @@ -59,7 +57,7 @@ class BookmarkDto { // TODO: 2021/12/04 RequestParam 데이터 검증 @ApiModelProperty(value = "북마크 url", required = true, example = "https://www.naver.com") - var link: String, + var url: String, @ApiModelProperty(value = "북마크 제목", example = "Bookmark Title") var title: String, diff --git a/src/test/kotlin/com/yapp/web2/domain/bookmark/service/SharedBookmarkServiceTest.kt b/src/test/kotlin/com/yapp/web2/domain/bookmark/service/SharedBookmarkServiceTest.kt index 996036ef..2b05049d 100644 --- a/src/test/kotlin/com/yapp/web2/domain/bookmark/service/SharedBookmarkServiceTest.kt +++ b/src/test/kotlin/com/yapp/web2/domain/bookmark/service/SharedBookmarkServiceTest.kt @@ -92,7 +92,7 @@ internal class SharedBookmarkServiceTest { // then assertAll( - {Assertions.assertThat(actual.link).isEqualTo(testDto.link)}, + {Assertions.assertThat(actual.link).isEqualTo(testDto.url)}, {Assertions.assertThat(actual.title).isEqualTo(testDto.title)}, {Assertions.assertThat(actual.image).isEqualTo(testDto.image)}, {Assertions.assertThat(actual.image).isEqualTo(testDto.image)},