Created
March 11, 2019 12:31
-
-
Save DjakaTechnology/4180c4e14d1f8c93962b1d7793479511 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
object Request{ | |
suspend fun login(context:Context, email:String, password:String, token:String):UserModel?{ | |
val api = getApiService(context) | |
val request = api.login(email, password, token) | |
return try{ | |
return request.await().body()!! | |
}catch (e: Exception){ | |
Log.e("TAG", "Login Failed" + e.message) | |
null | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment