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

[Feat] Swagger 적용 #41

Merged
merged 8 commits into from
Jan 25, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ data class CompanionPlantCreateRequest(
@PastOrPresent(message = "마지막 물주기 날짜는 과거 또는 현재의 날짜여야 합니다. lastWaterDate: \${validatedValue}")
@DateTimeFormat(pattern = "yyyy-MM-dd") val lastWaterDate: LocalDate,
) {
fun toEntity(imagePath: String, memberId: Long, waterCycle: Int): CompanionPlant {
fun toEntity(imagePath: String, memberId: Long, waterCycle: Int, plantInformationId: Long): CompanionPlant {
// TODO : Cloud 환경으로 이전 후 제거, 로컬 사진 저장 테스트 용도
val baseUrl: String = "https://nongsaro.go.kr/"
val baseUrl = "https://nongsaro.go.kr/"
return CompanionPlant(
_imageUrl = baseUrl + imagePath,
_shortDescription = this.shortDescription,
Expand All @@ -29,6 +29,7 @@ data class CompanionPlantCreateRequest(
waterCycle = waterCycle,
birthDate = this.birthDate,
memberId = memberId,
plantInformationId = plantInformationId
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TEST는 어째서 통과...? 어렵다 JPA....

)
}
}