From a0ba813d5f54c56e273034c08a875b18a4c32ac2 Mon Sep 17 00:00:00 2001 From: Minecon724 Date: Wed, 31 Jul 2024 15:52:20 +0200 Subject: [PATCH] debugging to api callbacks --- .../eu/m724/vastapp/vastai/api/InstancesUrlRequestCallback.kt | 1 + .../java/eu/m724/vastapp/vastai/api/UserUrlRequestCallback.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/m724/vastapp/vastai/api/InstancesUrlRequestCallback.kt b/app/src/main/java/eu/m724/vastapp/vastai/api/InstancesUrlRequestCallback.kt index da5eb1d..de71c0d 100644 --- a/app/src/main/java/eu/m724/vastapp/vastai/api/InstancesUrlRequestCallback.kt +++ b/app/src/main/java/eu/m724/vastapp/vastai/api/InstancesUrlRequestCallback.kt @@ -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() diff --git a/app/src/main/java/eu/m724/vastapp/vastai/api/UserUrlRequestCallback.kt b/app/src/main/java/eu/m724/vastapp/vastai/api/UserUrlRequestCallback.kt index bae156a..7bf693e 100644 --- a/app/src/main/java/eu/m724/vastapp/vastai/api/UserUrlRequestCallback.kt +++ b/app/src/main/java/eu/m724/vastapp/vastai/api/UserUrlRequestCallback.kt @@ -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"),