Skip to content

Commit

Permalink
Merge pull request #2138 from billmn/api-groups-order
Browse files Browse the repository at this point in the history
Api groups order
  • Loading branch information
jbrooksuk committed Oct 6, 2016
2 parents 5b2d99e + 7cdd537 commit c778ce9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Api/ComponentGroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function getGroups()
$groups->search(Binput::except(['sort', 'order', 'per_page']));

if ($sortBy = Binput::get('sort')) {
$direction = Binput::has('order') && Binput::get('order') == 'desc';
$direction = Binput::get('order', 'asc');

$groups->sort($sortBy, $direction);
}
Expand Down

0 comments on commit c778ce9

Please sign in to comment.