From dc718bcb4f9a2e3fcea2772955d0e779c8bdc81e Mon Sep 17 00:00:00 2001 From: jiwoo Date: Wed, 24 Jan 2024 15:22:45 +0900 Subject: [PATCH] =?UTF-8?q?feat(CompanionPlantCreateRequest):=20=EC=9E=84?= =?UTF-8?q?=EC=8B=9C=20=EC=82=AC=EC=A7=84=20baseUrl=20=EA=B2=BD=EB=A1=9C?= =?UTF-8?q?=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plant/presentation/dto/CompanionPlantCreateRequest.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/gdsc/plantory/plant/presentation/dto/CompanionPlantCreateRequest.kt b/src/main/kotlin/gdsc/plantory/plant/presentation/dto/CompanionPlantCreateRequest.kt index c4995f1..ecb29cc 100644 --- a/src/main/kotlin/gdsc/plantory/plant/presentation/dto/CompanionPlantCreateRequest.kt +++ b/src/main/kotlin/gdsc/plantory/plant/presentation/dto/CompanionPlantCreateRequest.kt @@ -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()), @@ -29,4 +31,4 @@ data class CompanionPlantCreateRequest( memberId = memberId, ) } -} \ No newline at end of file +}