move route handling to offerController
This commit is contained in:
parent
e4c3aa17af
commit
90d67833e1
2 changed files with 11 additions and 11 deletions
|
@ -139,4 +139,15 @@ class OfferController extends AbstractController
|
||||||
|
|
||||||
throw new HttpException(403, "No permission");
|
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),
|
||||||
|
]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,15 +105,4 @@ class UserController extends AbstractController
|
||||||
|
|
||||||
throw new HttpException(403, "No permission");
|
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),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue