return request instead of collection

This commit is contained in:
Martz
2023-02-16 19:40:08 +01:00
parent 51c403abd0
commit 49b63ca434

View File

@@ -18,7 +18,7 @@ class Collection
$ch = curl_init(); $ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->url . "/api/collections/".$this->collection."/records"); curl_setopt($ch, CURLOPT_URL, $this->url . "/api/collections/".$this->collection."/records");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = new Collection(curl_exec($ch)); $output = curl_exec($ch);
curl_close($ch); curl_close($ch);
return json_decode($output, JSON_FORCE_OBJECT); return json_decode($output, JSON_FORCE_OBJECT);