feat: converts active download list to live component with polling
This commit is contained in:
@@ -36,11 +36,12 @@ class DownloadRepository extends ServiceEntityRepository
|
||||
return new \Doctrine\ORM\Tools\Pagination\Paginator($query);
|
||||
}
|
||||
|
||||
public function getActivePaginated(int $pageNumber = 1, int $perPage = 10)
|
||||
public function getActivePaginated(int $pageNumber = 1, int $perPage = 5)
|
||||
{
|
||||
$firstResult = ($pageNumber - 1) * $perPage;
|
||||
$query = $this->createQueryBuilder('d')
|
||||
->andWhere('d.status IN (:statuses)')
|
||||
->orderBy('d.id', 'DESC')
|
||||
->setParameter('statuses', ['New', 'In Progress'])
|
||||
->setFirstResult($firstResult)
|
||||
->setMaxResults($perPage)
|
||||
|
||||
Reference in New Issue
Block a user