From bedd42ea6bb2ce805668824722935b9a512f7498 Mon Sep 17 00:00:00 2001 From: GunHyung Ham <54674781+ham2174@users.noreply.github.com> Date: Tue, 12 Nov 2024 14:27:20 +0900 Subject: [PATCH] =?UTF-8?q?[Fix]=20UserProfielResponse=20=EB=8D=B0?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=ED=95=84=EB=93=9C=20null-safety=20?= =?UTF-8?q?=EC=A0=81=EC=9A=A9=20(#135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [fix] : UserProfielResponse 데이터 필드 null-safty 적용 --- .../bottles/core/data/mapper/UserProfileResponseMapper.kt | 6 +++--- .../network/dto/profile/reponse/UserProfileResponse.kt | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/data/src/main/kotlin/com/team/bottles/core/data/mapper/UserProfileResponseMapper.kt b/core/data/src/main/kotlin/com/team/bottles/core/data/mapper/UserProfileResponseMapper.kt index a1b1fd04..7d89240b 100644 --- a/core/data/src/main/kotlin/com/team/bottles/core/data/mapper/UserProfileResponseMapper.kt +++ b/core/data/src/main/kotlin/com/team/bottles/core/data/mapper/UserProfileResponseMapper.kt @@ -35,9 +35,9 @@ fun UserProfileSelectDTO.toUserProfileSelect(): UserProfileSelect = interest = this.interest.toInterest(), job = this.job, height = this.height, - smoking = this.smoking, - alcohol = this.alcohol, - religion = this.religion, + smoking = this.smoking?: "", + alcohol = this.alcohol?: "", + religion = this.religion?: "", region = this.region.toRegion(), ) diff --git a/core/network/src/main/kotlin/com/team/bottles/network/dto/profile/reponse/UserProfileResponse.kt b/core/network/src/main/kotlin/com/team/bottles/network/dto/profile/reponse/UserProfileResponse.kt index 65b6cbeb..cf86f423 100644 --- a/core/network/src/main/kotlin/com/team/bottles/network/dto/profile/reponse/UserProfileResponse.kt +++ b/core/network/src/main/kotlin/com/team/bottles/network/dto/profile/reponse/UserProfileResponse.kt @@ -21,9 +21,9 @@ data class UserProfileSelectDTO( @SerialName("interest") val interest: InterestDto, @SerialName("job") val job: String, @SerialName("height") val height: Int, - @SerialName("smoking") val smoking: String, - @SerialName("alcohol") val alcohol: String, - @SerialName("religion") val religion: String, + @SerialName("smoking") val smoking: String?, + @SerialName("alcohol") val alcohol: String?, + @SerialName("religion") val religion: String?, @SerialName("region") val region: RegionDto, )