fix up API route return

This commit is contained in:
Dane Everitt 2016-10-07 14:26:50 -04:00
parent 9d55e93e9e
commit 06422b2055
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
6 changed files with 11 additions and 16 deletions

View file

@ -62,8 +62,7 @@ class NodeController extends BaseController
*/
public function list(Request $request)
{
$nodes = Models\Node::paginate(50);
return $this->response->paginator($nodes, new NodeTransformer);
return Models\Node::all()->toArray();
}
/**
@ -170,11 +169,11 @@ class NodeController extends BaseController
*/
public function allocations(Request $request)
{
$allocations = Models\Allocation::paginate(100);
$allocations = Models\Allocation::all();
if ($allocations->count() < 1) {
throw new NotFoundHttpException('No allocations have been created.');
}
return $this->response->paginator($allocations, new AllocationTransformer);
return $allocations;
}
/**