Added admin dashboard, refactored user dashboard. Removed old reviews route.
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m53s
CI - Build Tonehaus Docker image / tonehaus-ci-build (push) Successful in 1m53s
This commit is contained in:
1 parent
cd04fa5212
commit
f15d9a9cfd
16 files changed
+534
-75
No files matched your search
@@ -17,13 +17,11 @@ use Symfony\Component\Routing\Attribute\Route;
|
||||
#[Route('/reviews')]
|
||||
class ReviewController extends AbstractController
|
||||
{
|
||||
// Exclusively for compat, used to route to standalone reviews page.
|
||||
#[Route('', name: 'review_index', methods: ['GET'])]
|
||||
public function index(ReviewRepository $reviewRepository): Response
|
||||
public function index(): Response
|
||||
{
|
||||
$reviews = $reviewRepository->findLatest(50);
|
||||
return $this->render('review/index.html.twig', [
|
||||
'reviews' => $reviews,
|
||||
]);
|
||||
return $this->redirectToRoute('account_dashboard');
|
||||
}
|
||||
|
||||
#[Route('/new', name: 'review_new', methods: ['GET', 'POST'])]
|
||||
@@ -77,7 +75,7 @@ class ReviewController extends AbstractController
|
||||
$em->flush();
|
||||
$this->addFlash('success', 'Review deleted.');
|
||||
}
|
||||
return $this->redirectToRoute('review_index');
|
||||
return $this->redirectToRoute('account_dashboard');
|
||||
}
|
||||
|
||||
// fetchAlbumById no longer needed; album view handles retrieval and creation
|
||||
|
||||
Reference in new issue
Block a user