Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
-> Now the main "/" URL is a dashboard redirect, and the errors are being sent to it.
  • Loading branch information
NaysKutzu committed Oct 21, 2023
1 parent ce806af commit b22a50c
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions routes/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?php
$router->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 () {
Expand Down

0 comments on commit b22a50c

Please sign in to comment.