From f8d737c52810f0b41204f8689733bfe4b8a62fd2 Mon Sep 17 00:00:00 2001 From: "nisch.codes" Date: Mon, 21 Jul 2025 22:07:04 +0200 Subject: [PATCH] Initial Code commit --- public/index.php | 3 --- src/HTTP.php | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/public/index.php b/public/index.php index 5b19a9b..c022c3b 100644 --- a/public/index.php +++ b/public/index.php @@ -50,9 +50,6 @@ "Content-Type: application/json", "OCS-APIRequest: true" ]); - - // convert data to json - $respData = json_decode($response, true); //print_r($respData); diff --git a/src/HTTP.php b/src/HTTP.php index b9ef10d..32c29b8 100644 --- a/src/HTTP.php +++ b/src/HTTP.php @@ -40,6 +40,6 @@ class HTTP { static function fetchJSON(string $url, ?Array $headers = [], ?bool $associative = true): Mixed { // converts the response of fetch into an JSON array/object - return json_decode(fetch($url, $headers), $associative); + return json_decode(self::fetch($url, $headers), $associative); } } \ No newline at end of file