From b22a50c5a7fdb04c1c8e9457cf7afb1b4cb8173b Mon Sep 17 00:00:00 2001 From: NaysKutzu Date: Sat, 21 Oct 2023 17:26:49 +0000 Subject: [PATCH] PUSH -> Now the main "/" URL is a dashboard redirect, and the errors are being sent to it. --- routes/index.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/routes/index.php b/routes/index.php index a8bc0a20..d63ca10b 100644 --- a/routes/index.php +++ b/routes/index.php @@ -1,7 +1,12 @@ add('/', function () { - require("../include/main.php"); - require("../view/index.php"); +$router->add('/', function() { + if (isset($_GET['e'])) { + header('location: /dashboard?e='. $_GET['e']); + } else if (isset($_GET['s'])) { + header('location: /dashboard?s='. $_GET['s']); + } else { + header('location: /dashboard'); + } }); $router->add('/dashboard', function () {