mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: update watchlist limitations
This commit is contained in:
@@ -160,7 +160,9 @@ class WatchListController extends AbstractController
|
|||||||
$userWatchLists = $user->getWatchLists();
|
$userWatchLists = $user->getWatchLists();
|
||||||
|
|
||||||
/** @var Domain[] $trackedDomains */
|
/** @var Domain[] $trackedDomains */
|
||||||
$trackedDomains = $userWatchLists->reduce(fn (array $acc, WatchList $watchList) => [...$acc, ...$watchList->getDomains()->toArray()], []);
|
$trackedDomains = $userWatchLists
|
||||||
|
->filter(fn (WatchList $wl) => $wl !== $watchList)
|
||||||
|
->reduce(fn (array $acc, WatchList $wl) => [...$acc, ...$wl->getDomains()->toArray()], []);
|
||||||
|
|
||||||
/** @var Domain $domain */
|
/** @var Domain $domain */
|
||||||
foreach ($watchList->getDomains()->getIterator() as $domain) {
|
foreach ($watchList->getDomains()->getIterator() as $domain) {
|
||||||
|
|||||||
Reference in New Issue
Block a user