mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-04 02:14:06 +02:00
allow filtering by time when listing demos in api
This commit is contained in:
parent
4c3e219815
commit
0d70d93e13
5 changed files with 82 additions and 3 deletions
|
|
@ -71,6 +71,14 @@ class DemoListProvider extends BaseProvider {
|
|||
$query->andWhere($query->expr()->eq('backend',
|
||||
$query->createNamedParameter($where['backend'])));
|
||||
}
|
||||
if (isset($where['before'])) {
|
||||
$query->andWhere($query->expr()->lt('created_at',
|
||||
$query->createNamedParameter($where['before']->format(DATE_ATOM))));
|
||||
}
|
||||
if (isset($where['after'])) {
|
||||
$query->andWhere($query->expr()->gt('created_at',
|
||||
$query->createNamedParameter($where['after']->format(DATE_ATOM))));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue