Update GalaxiesController.php

pull/2389/head
truckydev 2017-08-10 16:32:17 +02:00 committed by GitHub
parent 1dc58939f9
commit e6203fb6dc
1 changed files with 9 additions and 2 deletions

View File

@ -16,8 +16,15 @@ class GalaxiesController extends AppController {
);
public function index() {
$galaxies = $this->paginate();
$this->set('list', $galaxies);
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());
}else{
$galaxies = $this->paginate();
$this->set('list', $galaxies);
}
}
public function update() {