diff --git a/src/Controller/OfferController.php b/src/Controller/OfferController.php index 49d260a..b1a1d67 100644 --- a/src/Controller/OfferController.php +++ b/src/Controller/OfferController.php @@ -130,12 +130,14 @@ class OfferController extends AbstractController { $this->entityManager->remove($offer); $this->entityManager->flush(); - } + $this->addFlash( + 'success','Successfully removed offer!' + ); + + return $this->redirectToRoute('user_page'); + } - $this->addFlash( - 'success','Successfully removed offer!' - ); - - return $this->redirectToRoute('user_page'); - } + throw new HttpException(403, "No permission"); + + } }