Tickets erweitert

This commit is contained in:
2025-06-23 11:11:18 +02:00
parent 1964cadd8c
commit 66ff531ba4
2 changed files with 26 additions and 4 deletions

View File

@@ -11,8 +11,7 @@ class TicketController {
protected $ticketModel;
protected $eventModel;
public function __construct($view)
{
public function __construct($view) {
$this->ticketModel = new TicketModel();
$this->eventModel = new EventModel();
$this->view = $view;
@@ -35,8 +34,11 @@ class TicketController {
);
}
private function hasTicket($userId, $eventId, $gueltigkeitsdatum) {
public function hasTicket() {
$userId = $_GET["userId"];
$eventId = $_GET["eventId"];
$erg = $this->ticketModel->hasTicket($userId, $eventId);
echo json_encode($erg, JSON_UNESCAPED_UNICODE);
}
}