disable ticket purchase #54

Open
csimonis wants to merge 1 commits from disable-ticket-purchase into main

View File

@ -23,12 +23,16 @@ final class TicketController extends AbstractController
#[Route('/ticket', name: 'app_ticket')]
public function index(): Response
{
return $this->render('ticket/index.html.twig');
noty()->error('Ticket Kauf wurde gestoppt. Nimm Kontakt mit dem Support auf falls es nötig ist.');
return $this->redirectToRoute('app_home');
}
#[Route(path: '/ticket/submit', name: 'app_submit', methods: Request::METHOD_POST)]
public function submit(Request $request): Response
{
return $this->index();
$ticketData = $this->serializer->deserialize($request->getContent(), TicketFormData::class, 'json');
return $this->json(['id' => $this->service->handleTicketData($ticketData)->id]);