Update GalaxiesController.php

pull/2389/head
truckydev 2017-08-10 16:37:08 +02:00 committed by GitHub
parent e6203fb6dc
commit f46c3a9142
1 changed files with 1 additions and 3 deletions

View File

@ -18,9 +18,7 @@ class GalaxiesController extends AppController {
public function index() {
if ($this->_isRest()) {
$galaxies = $this->Galaxy->find('all',array('recursive' => -1));
$this->set('galaxies', $galaxies);
$this->set('_serialize', array('galaxies'));
//return $this->RestResponse->viewData($galaxies, $this->response->type());
return $this->RestResponse->viewData($galaxies);
}else{
$galaxies = $this->paginate();
$this->set('list', $galaxies);