1
0
Fork 0
mirror of https://codeberg.org/demostf/api.git synced 2026-06-03 18:04:08 +02:00

allow ordering demo list

This commit is contained in:
Robin Appelman 2017-06-10 12:29:14 +02:00
commit 0f5f74e21b
2 changed files with 5 additions and 3 deletions

View file

@ -58,7 +58,8 @@ class DemoController extends BaseController {
public function listDemos() {
$page = $this->query('page', 1);
\Flight::json($this->demoListProvider->listDemos($page, $this->getFilter()));
$order = $this->query('order', 'DESC') === 'ASC' ? 'ASC' : 'DESC';
\Flight::json($this->demoListProvider->listDemos($page, $this->getFilter(), $order));
}
public function listProfile($steamid) {