From 8acf7c23b15b5c223b2cf4a1570a098e4ac2f8ff Mon Sep 17 00:00:00 2001 From: RiFav <13521075@std.stei.itb.ac.id> Date: Sun, 8 Oct 2023 04:29:04 +0700 Subject: [PATCH] fix: routing get event --- app/router.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/router.php b/app/router.php index b93d975..4a9b67a 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 -- GitLab