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

make order option case insensitive

This commit is contained in:
Robin Appelman 2022-06-28 20:43:31 +02:00
commit faacca26fe

View file

@ -120,7 +120,7 @@ class DemoController extends BaseController {
public function listDemos(): void { public function listDemos(): void {
$page = (int) $this->query('page', '1'); $page = (int) $this->query('page', '1');
$order = 'ASC' === $this->query('order', 'DESC') ? 'ASC' : 'DESC'; $order = 'ASC' === strtoupper($this->query('order', 'DESC')) ? 'ASC' : 'DESC';
$this->json($this->demoListProvider->listDemos((int) $page, $this->getFilter(), $order)); $this->json($this->demoListProvider->listDemos((int) $page, $this->getFilter(), $order));
} }