mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
ordering for profile and uploads
This commit is contained in:
parent
202d11fcc9
commit
750de60257
2 changed files with 8 additions and 6 deletions
|
|
@ -120,12 +120,14 @@ class DemoController extends BaseController {
|
|||
$page = (int) $this->query('page', '1');
|
||||
$where = $this->getFilter();
|
||||
$where['players'][] = $steamId;
|
||||
$this->json($this->demoListProvider->listProfile((int) $page, $where));
|
||||
$order = 'ASC' === $this->query('order', 'DESC') ? 'ASC' : 'DESC';
|
||||
$this->json($this->demoListProvider->listProfile((int) $page, $where, $order));
|
||||
}
|
||||
|
||||
public function listUploads(string $steamId): void {
|
||||
$page = (int) $this->query('page', '1');
|
||||
$this->json($this->demoListProvider->listUploads($steamId, (int) $page, $this->getFilter()));
|
||||
$order = 'ASC' === $this->query('order', 'DESC') ? 'ASC' : 'DESC';
|
||||
$this->json($this->demoListProvider->listUploads($steamId, (int) $page, $this->getFilter(), $order));
|
||||
}
|
||||
|
||||
public function chat(string $demoId): void {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue