mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
define torrent add event #4
This commit is contained in:
parent
46d5e25a5f
commit
964dae97aa
2 changed files with 38 additions and 2 deletions
|
|
@ -30,7 +30,7 @@ class ActivityService
|
|||
}
|
||||
|
||||
// User
|
||||
public function addEventUserJoin(
|
||||
public function addEventUserAdd(
|
||||
int $userId,
|
||||
int $added
|
||||
): ?Activity
|
||||
|
|
@ -121,6 +121,35 @@ class ActivityService
|
|||
}
|
||||
|
||||
// Torrent
|
||||
public function addEventTorrentAdd(
|
||||
int $userId,
|
||||
int $added,
|
||||
int $torrentId
|
||||
): ?Activity
|
||||
{
|
||||
$activity = new Activity();
|
||||
|
||||
$activity->setEvent(
|
||||
Activity::EVENT_TORRENT_ADD
|
||||
);
|
||||
|
||||
$activity->setUserId(
|
||||
$userId
|
||||
);
|
||||
|
||||
$activity->setAdded(
|
||||
$added
|
||||
);
|
||||
|
||||
$activity->setTorrentId(
|
||||
$torrentId
|
||||
);
|
||||
|
||||
$this->entityManagerInterface->persist($activity);
|
||||
$this->entityManagerInterface->flush();
|
||||
|
||||
return $activity;
|
||||
}
|
||||
|
||||
/// Torrent star
|
||||
public function addEventTorrentStarAdd(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue