Compare commits
1 Commits
main
...
disable-ti
Author | SHA1 | Date | |
---|---|---|---|
c871b828f0
|
@ -23,12 +23,16 @@ final class TicketController extends AbstractController
|
|||||||
#[Route('/ticket', name: 'app_ticket')]
|
#[Route('/ticket', name: 'app_ticket')]
|
||||||
public function index(): Response
|
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)]
|
#[Route(path: '/ticket/submit', name: 'app_submit', methods: Request::METHOD_POST)]
|
||||||
public function submit(Request $request): Response
|
public function submit(Request $request): Response
|
||||||
{
|
{
|
||||||
|
return $this->index();
|
||||||
|
|
||||||
$ticketData = $this->serializer->deserialize($request->getContent(), TicketFormData::class, 'json');
|
$ticketData = $this->serializer->deserialize($request->getContent(), TicketFormData::class, 'json');
|
||||||
|
|
||||||
return $this->json(['id' => $this->service->handleTicketData($ticketData)->id]);
|
return $this->json(['id' => $this->service->handleTicketData($ticketData)->id]);
|
||||||
|
Reference in New Issue
Block a user