implement bookmarks total counter

This commit is contained in:
ghost 2023-10-08 20:37:50 +03:00
parent 3d74818303
commit 5b0a7bcb69
5 changed files with 62 additions and 52 deletions

View file

@ -61,11 +61,13 @@ class TorrentController extends AbstractController
'sensitive' => $torrentService->findLastTorrentSensitive($torrent->getId())->isValue(),
'bookmark' =>
[
'active' => $torrentService->findUserLastTorrentBookmarkValue(
'active' => (bool) $torrentService->findTorrentBookmark(
$torrent->getId(),
$user->getId()
),
'total' => 0,
'total' => $torrentService->findTorrentBookmarksTotalByTorrentId(
$torrent->getId()
),
],
'pages' => []
],