mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-18 23:08:46 +02:00
Revert REST API init objects array (#231)
We didn't anticipated this was causing the REST API response to be changed for all consumers : - before PR `"objects":null` - after `"objects":[]` We don't want that :/ We will instead fix collector-base (object of another PR, see #231) This reverts commit7243da3576. This reverts commit0940741568.
This commit is contained in:
@@ -135,15 +135,8 @@ class ObjectResult
|
||||
*/
|
||||
class RestResultWithObjects extends RestResult
|
||||
{
|
||||
/** @var DBObject[] */
|
||||
public $objects;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->objects = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Report the given object
|
||||
*
|
||||
@@ -192,7 +185,6 @@ class RestResultWithObjects extends RestResult
|
||||
|
||||
class RestResultWithRelations extends RestResultWithObjects
|
||||
{
|
||||
/** @var array */
|
||||
public $relations;
|
||||
|
||||
public function __construct()
|
||||
|
||||
@@ -180,7 +180,7 @@ JSON;
|
||||
$this->assertContains($sExpectedJsonOuput, $this->DeleteTicketFromApi($iId));
|
||||
|
||||
$sExpectedJsonOuput=<<<JSON
|
||||
{"objects":[],"code":0,"message":"Found: 0"}
|
||||
{"objects":null,"code":0,"message":"Found: 0"}
|
||||
JSON;
|
||||
$this->assertEquals($sExpectedJsonOuput, $this->GetTicketViaRest($iId));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user