Show users offers on dedicated page

This commit is contained in:
Jannis Portmann 2021-05-18 19:39:44 +02:00
parent c2636811fd
commit 1ae9096729
4 changed files with 49 additions and 38 deletions

View file

@ -47,7 +47,7 @@ class UserController extends AbstractController
{
$user = $this->getUser();
return $this->render('user/offers.html.twig', [
return $this->render('user/public.html.twig', [
'user' => $user,
'offers' => $offeringRepository->findByUser($user),
]);
@ -105,4 +105,15 @@ class UserController extends AbstractController
throw new HttpException(403, "No permission");
}
#[Route('/myoffers', name: 'own_offers')]
public function ownOffers(OfferingRepository $offeringRepository): Response
{
$user = $this->getUser();
return $this->render('user/offers.html.twig', [
'user' => $user,
'offers' => $offeringRepository->findByUser($user),
]);
}
}