Use uniqid for wishes and users
This commit is contained in:
parent
ee063cd439
commit
946b30b486
10 changed files with 77 additions and 9 deletions
|
@ -19,7 +19,7 @@ use Symfony\Component\Routing\Annotation\Route;
|
|||
|
||||
class TradeController extends AbstractController
|
||||
{
|
||||
#[Route('/trade/{id}', name: 'trade')]
|
||||
#[Route('/trade/{urlId}', name: 'trade')]
|
||||
public function sendEmail(MailerInterface $mailer, Offering $offer, OfferingRepository $offeringRepository, WishRepository $wishRepository): Response
|
||||
{
|
||||
$user = $this->getUser();
|
||||
|
@ -35,7 +35,7 @@ class TradeController extends AbstractController
|
|||
->htmlTemplate('user/trade/offer_email.html.twig')
|
||||
->context([
|
||||
'user' => $user,
|
||||
'id' => $user->getId(),
|
||||
'urlId' => $user->getUrlId(),
|
||||
])
|
||||
;
|
||||
try
|
||||
|
@ -49,6 +49,6 @@ class TradeController extends AbstractController
|
|||
$this->addFlash('error','You can\'t trade with yourself!');
|
||||
}
|
||||
|
||||
return $this->redirectToRoute('show_offer', ['urlId' => $offer->getId()]);
|
||||
return $this->redirectToRoute('show_offer', ['urlId' => $offer->getUrlId()]);
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue