diff --git a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt index 54bd08b4..30f88485 100644 --- a/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt +++ b/feature/management/src/main/java/com/wap/wapp/feature/management/ManagementViewModel.kt @@ -39,16 +39,14 @@ class ManagementViewModel @Inject constructor( private val _eventList: MutableStateFlow = MutableStateFlow(EventsState.Init) val eventList: StateFlow = _eventList.asStateFlow() - fun getUserRole() { - viewModelScope.launch { - getUserRoleUseCase() - .onSuccess { userRole -> - _userRole.value = UserRoleUiState.Success(userRole) - } - .onFailure { exception -> - _errorFlow.emit(exception) - } - } + fun getUserRole() = viewModelScope.launch { + getUserRoleUseCase() + .onSuccess { userRole -> + _userRole.value = UserRoleUiState.Success(userRole) + } + .onFailure { exception -> + _errorFlow.emit(exception) + } } fun getEventSurveyList() = viewModelScope.launch {