diff --git a/app/router.php b/app/router.php index b93d975f4f3315e4328fb3018f08303c51616c99..4a9b67a602acd4dd94b0e7613c415fe060795a61 100644 --- a/app/router.php +++ b/app/router.php @@ -20,17 +20,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { } elseif (isset($_GET["purchaseAction"])) { $pembelianController->handleRequest(); } + } elseif ($_SERVER["REQUEST_METHOD"] == "GET") { - if (isset($_GET["ticketAction"])) { + if (isset($_GET["eventAction"]) && isset($_GET["eventId"])) { + $eventController->handleRequest(); + } elseif (isset($_GET["ticketAction"])) { $ticketController->handleRequest(); } elseif (isset($_GET["userAction"])) { $userController->handleRequest(); } } - -elseif ($_SERVER["REQUEST_METHOD"] == "GET") { - if (isset($_GET["eventAction"]) && isset($_GET["eventId"])) { - $eventController->handleRequest(); - } -} ?> \ No newline at end of file