Skip to content

Instantly share code, notes, and snippets.

@DjakaTechnology
Created March 11, 2019 12:31
Show Gist options
  • Save DjakaTechnology/4180c4e14d1f8c93962b1d7793479511 to your computer and use it in GitHub Desktop.
Save DjakaTechnology/4180c4e14d1f8c93962b1d7793479511 to your computer and use it in GitHub Desktop.
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