diff --git a/src/RedirectorRoutes.php b/src/RedirectorRoutes.php index 61542ce..edaecab 100644 --- a/src/RedirectorRoutes.php +++ b/src/RedirectorRoutes.php @@ -13,24 +13,24 @@ final class RedirectorRoutes { $this->dbConn = $dbConn; $this->urls = $urls; - $router->get('/', [$this, 'index']); + $router->get('/', $this->index(...)); // profile - $router->get('/[up]([0-9]+)', [$this, 'redirectProfile']); - $router->get('/[up]/([A-Za-z0-9\-_]+)', [$this, 'redirectProfile']); + $router->get('/[up]([0-9]+)', $this->redirectProfile(...)); + $router->get('/[up]/([A-Za-z0-9\-_]+)', $this->redirectProfile(...)); // forum categories - $router->get('/f/?([0-9]+)', [$this, 'redirectForumCategory']); - $router->get('/fc/?([0-9]+)', [$this, 'redirectForumCategory']); + $router->get('/f/?([0-9]+)', $this->redirectForumCategory(...)); + $router->get('/fc/?([0-9]+)', $this->redirectForumCategory(...)); // forum topic - $router->get('/ft/?([0-9]+)', [$this, 'redirectForumTopic']); + $router->get('/ft/?([0-9]+)', $this->redirectForumTopic(...)); // forum post - $router->get('/fp/?([0-9]+)', [$this, 'redirectForumPost']); + $router->get('/fp/?([0-9]+)', $this->redirectForumPost(...)); // databased, registered last cuz it matches everything otherwise! - $router->get('/([A-Za-z0-9\-_]+)', [$this, 'redirectDatabase']); + $router->get('/([A-Za-z0-9\-_]+)', $this->redirectDatabase(...)); } public function index($response): void {