diff --git a/src/Controller/TradeController.php b/src/Controller/TradeController.php index effc2cc..3cd4868 100644 --- a/src/Controller/TradeController.php +++ b/src/Controller/TradeController.php @@ -14,20 +14,14 @@ use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Mime\Email; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Symfony\Component\Routing\RouterInterface; class TradeController extends AbstractController { #[Route('/trade/{id}', name: 'trade')] - public function sendEmail(MailerInterface $mailer, Offering $offer, OfferingRepository $offeringRepository, WishRepository $wishRepository, RouterInterface $router): Response + public function sendEmail(MailerInterface $mailer, Offering $offer, OfferingRepository $offeringRepository, WishRepository $wishRepository): Response { $user = $this->getUser(); - $this->router = $router; - $mail_url = $this->router->generate('user_public', [ - 'id' => $offer->getByUser()->getId(), - ], UrlGeneratorInterface::ABSOLUTE_URL); if($user != $offer->getByUser()) { @@ -40,8 +34,7 @@ class TradeController extends AbstractController ->htmlTemplate('user/trade/offer_email.html.twig') ->context([ 'user' => $user, - 'id' => $offer->getByUser()->getId(), - 'userOffersLink' => $mail_url, + 'id' => $user->getId(), ]) ; try