Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
feat(CompanionPlantCreateRequest): 임시 사진 baseUrl 경로 지정
Browse files Browse the repository at this point in the history
  • Loading branch information
zbqmgldjfh committed Jan 24, 2024
1 parent 37b6297 commit dc718bc
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ data class CompanionPlantCreateRequest(
@DateTimeFormat(pattern = "yyyy-MM-dd") val lastWaterDate: LocalDate,
) {
fun toEntity(imagePath: String, memberId: Long, waterCycle: Int): CompanionPlant {
// TODO : Cloud 환경으로 이전 후 제거, 로컬 사진 저장 테스트 용도
val baseUrl: String = "https://nongsaro.go.kr/"
return CompanionPlant(
_imageUrl = imagePath,
_imageUrl = baseUrl + imagePath,
_shortDescription = this.shortDescription,
_nickname = this.nickname,
nextWaterDate = this.lastWaterDate.plusDays(waterCycle.toLong()),
Expand All @@ -29,4 +31,4 @@ data class CompanionPlantCreateRequest(
memberId = memberId,
)
}
}
}

0 comments on commit dc718bc

Please sign in to comment.