debugging to api callbacks

This commit is contained in:
Minecon724 2024-07-31 15:52:20 +02:00
parent 5d7dd31354
commit a0ba813d5f
Signed by: Minecon724
GPG key ID: 3CCC4D267742C8E8
2 changed files with 2 additions and 1 deletions

View file

@ -41,6 +41,7 @@ class InstancesUrlRequestCallback(
}
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
println(stringResponse) // TODO don't do that
if (info?.httpStatusCode == 200) {
val jsonResponse = JSONObject(stringResponse.toString())
val instances = ArrayList<Instance>()

View file

@ -41,9 +41,9 @@ class UserUrlRequestCallback(
}
override fun onSucceeded(request: UrlRequest?, info: UrlResponseInfo?) {
println(stringResponse) // TODO don't do that
if (info?.httpStatusCode == 200) {
val jsonResponse = JSONObject(stringResponse.toString())
println(jsonResponse)
onSuccess(User(
id = jsonResponse.getString("id"),
username = jsonResponse.getString("username"),