Created
May 7, 2024 13:12
-
-
Save MkhytarMkhoian/4780b4662245406fefbdbb6b2de58230 to your computer and use it in GitHub Desktop.
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
class UserRemoteDataSource( | |
private val userApi: UserApi, | |
) { | |
suspend fun getUsers(): List<UserDTO> { | |
try { | |
return userApi.getUsers() | |
} catch (e: Exception) { | |
throw ApiException("Failed to get users", e) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment