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
|
|
@ -179,7 +179,8 @@ class TorrentController extends AbstractController
|
|||
Request $request,
|
||||
TranslatorInterface $translator,
|
||||
UserService $userService,
|
||||
TorrentService $torrentService
|
||||
TorrentService $torrentService,
|
||||
ActivityService $activityService
|
||||
): Response
|
||||
{
|
||||
// Init user
|
||||
|
|
@ -289,6 +290,12 @@ class TorrentController extends AbstractController
|
|||
$user->isApproved()
|
||||
);
|
||||
|
||||
$activityService->addEventTorrentAdd(
|
||||
$user->getId(),
|
||||
time(),
|
||||
$torrent->getId()
|
||||
);
|
||||
|
||||
// Redirect to info article created
|
||||
return $this->redirectToRoute(
|
||||
'torrent_info',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue