fix: [API] /objects/view should return dictionary not list

pull/4419/head
iglocska 2019-04-04 10:11:07 +02:00
parent b2ebee7e48
commit ad53fc2c17
1 changed files with 1 additions and 1 deletions

View File

@ -612,7 +612,7 @@ class ObjectsController extends AppController
if ($this->_isRest()) {
$objects = $this->MispObject->fetchObjects($this->Auth->user(), array('conditions' => array('Object.id' => $id)));
if (!empty($objects)) {
return $this->RestResponse->viewData($objects, $this->response->type());
return $this->RestResponse->viewData($objects[0], $this->response->type());
}
}
}