Selaa lähdekoodia

return correct object

CauseFX 4 vuotta sitten
vanhempi
commit
0efe381349
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      api/functions/demo-functions.php

+ 1 - 1
api/functions/demo-functions.php

@@ -16,7 +16,7 @@ trait DemoFunctions
 			$data = $this->userDefinedIdReplacementLink($data, ['plugins/images/cache/' => 'api/demo_data/' . $path . 'images/']);
 			$data = $this->userDefinedIdReplacementLink($data, ['plugins/images/cache/' => 'api/demo_data/' . $path . 'images/']);
 			$data = json_decode($data, true);
 			$data = json_decode($data, true);
 			$this->setResponse(200, 'Demo data for file: ' . $file, $data['response']['data']);
 			$this->setResponse(200, 'Demo data for file: ' . $file, $data['response']['data']);
-			return $data;
+			return $data['response']['data'];
 		} else {
 		} else {
 			$this->setResponse(404, 'Demo data was not found for file: ' . $file);
 			$this->setResponse(404, 'Demo data was not found for file: ' . $file);
 			return false;
 			return false;