mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-04-01 01:25:39 +00:00
refactor bookmarks to stars
This commit is contained in:
parent
997d9db562
commit
f260bda7ee
6 changed files with 46 additions and 46 deletions
|
|
@ -126,13 +126,13 @@ class TorrentController extends AbstractController
|
|||
)
|
||||
]
|
||||
],
|
||||
'bookmark' =>
|
||||
'star' =>
|
||||
[
|
||||
'exist' => (bool) $torrentService->findTorrentBookmark(
|
||||
'exist' => (bool) $torrentService->findTorrentStar(
|
||||
$torrent->getId(),
|
||||
$user->getId()
|
||||
),
|
||||
'total' => $torrentService->findTorrentBookmarksTotalByTorrentId(
|
||||
'total' => $torrentService->findTorrentStarsTotalByTorrentId(
|
||||
$torrent->getId()
|
||||
)
|
||||
],
|
||||
|
|
@ -901,10 +901,10 @@ class TorrentController extends AbstractController
|
|||
);
|
||||
}
|
||||
|
||||
// Torrent bookmark
|
||||
// Torrent star
|
||||
#[Route(
|
||||
'/{_locale}/torrent/{torrentId}/bookmark/toggle',
|
||||
name: 'torrent_bookmark_toggle',
|
||||
'/{_locale}/torrent/{torrentId}/star/toggle',
|
||||
name: 'torrent_star_toggle',
|
||||
requirements:
|
||||
[
|
||||
'torrentId' => '\d+',
|
||||
|
|
@ -914,7 +914,7 @@ class TorrentController extends AbstractController
|
|||
'GET'
|
||||
]
|
||||
)]
|
||||
public function toggleBookmark(
|
||||
public function toggleStar(
|
||||
Request $request,
|
||||
TranslatorInterface $translator,
|
||||
UserService $userService,
|
||||
|
|
@ -941,7 +941,7 @@ class TorrentController extends AbstractController
|
|||
}
|
||||
|
||||
// Update
|
||||
$torrentService->toggleTorrentBookmark(
|
||||
$torrentService->toggleTorrentStar(
|
||||
$torrent->getId(),
|
||||
$user->getId(),
|
||||
time()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue