mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
add torrent star event support #4
This commit is contained in:
parent
ef84fefca3
commit
a3dd5a81a9
7 changed files with 174 additions and 6 deletions
|
|
@ -582,12 +582,14 @@ class TorrentService
|
|||
int $torrentId,
|
||||
int $userId,
|
||||
int $added
|
||||
): void
|
||||
): bool
|
||||
{
|
||||
if ($torrentStar = $this->findTorrentStar($torrentId, $userId))
|
||||
{
|
||||
$this->entityManagerInterface->remove($torrentStar);
|
||||
$this->entityManagerInterface->flush();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
else
|
||||
|
|
@ -600,6 +602,8 @@ class TorrentService
|
|||
|
||||
$this->entityManagerInterface->persist($torrentStar);
|
||||
$this->entityManagerInterface->flush();
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue