wip: scopes downloads to usrs
This commit is contained in:
@@ -3,12 +3,13 @@
|
||||
namespace App\Twig\Components;
|
||||
|
||||
use App\Download\Framework\Repository\DownloadRepository;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
|
||||
use Symfony\UX\LiveComponent\Attribute\LiveAction;
|
||||
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
||||
|
||||
#[AsLiveComponent]
|
||||
final class ActiveDownloadList
|
||||
final class ActiveDownloadList extends AbstractController
|
||||
{
|
||||
use DefaultActionTrait;
|
||||
|
||||
@@ -19,6 +20,6 @@ final class ActiveDownloadList
|
||||
#[LiveAction]
|
||||
public function getDownloads()
|
||||
{
|
||||
return $this->downloadRepository->getActivePaginated();
|
||||
return $this->getUser()->getActiveDownloads();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user