Fix: Add dedicated process for withdrawal of applications by teamer

This commit is contained in:
Björn Fromme
2023-10-21 10:20:24 +02:00
parent e3dc2b22fd
commit 0fce77fbb7
3 changed files with 22 additions and 15 deletions
@@ -13,7 +13,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
class DeleteController extends AbstractController
class WithdrawController extends AbstractController
{
use ReturnUrlTrait;
@@ -23,8 +23,8 @@ class DeleteController extends AbstractController
) {
}
#[Route('/teamer/application/delete/{uuid}', name: 'app_teamer_application_delete')]
#[IsGranted('DELETE', subject: 'application')]
#[Route('/teamer/application/withdraw/{uuid}', name: 'app_teamer_application_withdraw')]
#[IsGranted('WITHDRAW', subject: 'application')]
public function index(Application $application, Request $request): Response
{
/** @var User $user */
@@ -35,7 +35,7 @@ class DeleteController extends AbstractController
$this->entityManager->remove($application);
$this->entityManager->flush();
$this->logger->info('Delete application', [
$this->logger->info('Withdraw application', [
'teamer_id' => $teamer->getId(),
'teamer_name' => (string) $teamer,
'application_id' => $application->getId(),