Skip to content

Commit

Permalink
[FEAT/#191] 공고 상세 기업 정보 데이터 불러오기
Browse files Browse the repository at this point in the history
  • Loading branch information
arinming committed Aug 30, 2024
1 parent 45d79fb commit 8e04191
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,19 @@ class InternViewModel @Inject constructor(

fun getInternInfo(id: Long) {
viewModelScope.launch {
internRepository.getInternInfo(
id
).onSuccess { internInfo ->
}.onFailure {
_sideEffect.emit(
InternViewSideEffect.Toast(R.string.server_failure)
)
}
internRepository.getInternInfo(id)
.onSuccess { internInfoModel ->
_internUiState.update { currentState ->
currentState.copy(loadState = UiState.Success(internInfoModel))
}
}
.onFailure {
_sideEffect.emit(InternViewSideEffect.Toast(R.string.server_failure))
}
}
}


fun postScrap(
id: Long,
color: Int,
Expand Down

0 comments on commit 8e04191

Please sign in to comment.