-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
156 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
app/src/main/java/umc/everyones/lck/data/dto/request/mypage/UpdateProfilesRequestDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,15 @@ | ||
package umc.everyones.lck.data.dto.request.mypage | ||
|
||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody | ||
import umc.everyones.lck.data.UpdateProfileRequest | ||
|
||
data class UpdateProfilesRequestDto( | ||
val profileImage: MultipartBody.Part, | ||
val updateProfileRequest: UpdateProfileRequestElementDto | ||
val updateProfileRequest: RequestBody | ||
) { | ||
data class UpdateProfileRequestElementDto( | ||
val nickname: String, | ||
val isDefaultImage: Boolean | ||
val nickname: String?, | ||
val defaultImage: Boolean | ||
) | ||
} |
8 changes: 4 additions & 4 deletions
8
app/src/main/java/umc/everyones/lck/data/dto/response/mypage/UpdateProfilesResponseDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
package umc.everyones.lck.data.dto.response.mypage | ||
|
||
import umc.everyones.lck.domain.model.response.mypage.UpdateProfilesModel | ||
import umc.everyones.lck.domain.model.response.mypage.UpdateProfilesResponseModel | ||
|
||
data class UpdateProfilesResponseDto( | ||
val updatedProfileImageUrl: String, | ||
val updatedProfileImageUrl: String, | ||
val updatedNickname: String | ||
){ | ||
fun toUpdateProfilesModel() = | ||
UpdateProfilesModel(updatedProfileImageUrl, updatedNickname) | ||
fun toUpdateProfilesResponseModel() = | ||
UpdateProfilesResponseModel(updatedProfileImageUrl, updatedNickname) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...src/main/java/umc/everyones/lck/domain/model/request/mypage/UpdateProfilesRequestModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package umc.everyones.lck.domain.model.request.mypage | ||
|
||
import com.google.gson.Gson | ||
import okhttp3.MediaType.Companion.toMediaTypeOrNull | ||
import okhttp3.MultipartBody | ||
import okhttp3.RequestBody.Companion.toRequestBody | ||
import umc.everyones.lck.data.dto.request.mypage.UpdateProfilesRequestDto | ||
|
||
data class UpdateProfilesRequestModel( | ||
val profileImage: MultipartBody.Part, | ||
val updateProfileRequest: UpdateProfileRequestElementModel | ||
) { | ||
data class UpdateProfileRequestElementModel( | ||
val nickname: String?, | ||
val defaultImage: Boolean | ||
) { | ||
fun toUpdateProfileRequestElementDto() = | ||
Gson().toJson(this).toRequestBody("application/json".toMediaTypeOrNull()) | ||
} | ||
fun toUpdateProfilesRequestDto() = | ||
UpdateProfilesRequestDto(profileImage, updateProfileRequest.toUpdateProfileRequestElementDto()) | ||
} |
4 changes: 2 additions & 2 deletions
4
...el/response/mypage/UpdateProfilesModel.kt → ...nse/mypage/UpdateProfilesResponseModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
package umc.everyones.lck.domain.model.response.mypage | ||
|
||
data class UpdateProfilesModel( | ||
val updatedProfileImageUrl: String, | ||
data class UpdateProfilesResponseModel( | ||
val updatedProfileImageUrl: String, | ||
val updatedNickname: String | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.