Skip to content

Commit

Permalink
πŸ”— :: (#428) ν”„λ‘œν•„ μˆ˜μ • μ˜ˆμ™Έμ²˜λ¦¬
Browse files Browse the repository at this point in the history
  • Loading branch information
parkuiery authored Nov 10, 2024
2 parents ec00f97 + 67a8654 commit 519f292
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,17 @@ internal class MyPageViewModel @Inject constructor(
uri = uri,
)
viewModelScope.launch(Dispatchers.IO) {
createPresignedUrlUseCase(files = listOf(file.name)).onSuccess {
uploadFileUseCase(
presignedUrl = it.urls.first().preSignedUrl,
file = file,
)
val profileImageUrl = it.urls.first().filePath
editProfileImage(profileImageUrl = profileImageUrl)
}
createPresignedUrlUseCase(files = listOf(file.name))
.onSuccess {
uploadFileUseCase(
presignedUrl = it.urls.first().preSignedUrl,
file = file,
)
val profileImageUrl = it.urls.first().filePath
editProfileImage(profileImageUrl = profileImageUrl)
}.onFailure {
postSideEffect(MyPageSideEffect.BadEditProfileImage)
}
}
}
}
Expand Down

0 comments on commit 519f292

Please sign in to comment.