wip: scopes downloads to usrs

This commit is contained in:
2025-05-11 00:12:55 -05:00
parent 854177a121
commit 6817bd8c80
5 changed files with 115 additions and 5 deletions

View File

@@ -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();
}
}