From 63895ee93c0c9e20089f1dae392ca23ecb8e45e0 Mon Sep 17 00:00:00 2001 From: Tykayn Date: Fri, 14 Feb 2025 18:21:21 +0100 Subject: [PATCH] start get my stuff on dashboard js --- src/Controller/DefaultController.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index 4cf03c62..564b4760 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -108,9 +108,13 @@ final class DefaultController extends AbstractController // TODO: replace this with actual logic to get products of the logged user // récupérer les produits de l'user connecté +$user = $this->getUser(); // $products = $this->getUser()->getProducts(); return $this->json([ - 'products' => $this->getUser()->getProducts(), + 'categories' => $user->getGroupOfProducts(), + 'products' => $user->getProducts(), + // mock land + 'lastFestival' => ['id'=>1] ]); } #[Route('/logged/import', name: 'import')]