[DEL] Vieux fetchQuestion

RepositoryAndroid
Renaud BEURET 1 year ago
parent 3711a0934f
commit 981afd5a3a

@ -33,15 +33,4 @@ class QuestionAPIRepository : IQuestionRepository {
Log.e("Requete API Question", e.message.toString())
}
}
suspend fun fetchQuestions2(index: Int): Flow<List<QuestionWithSimpleReponse>> = flow {
val serviceClient = createRequestService().create<QuestionRequestService>()
try {
val response = serviceClient.getQuestions(index)
emit(response.questions.ToModel())
} catch (e: Exception) {
Log.e("Requete API Question", e.message.toString())
}
}
}
Loading…
Cancel
Save