diff --git a/app/Controllers/TrendingController.php b/app/Controllers/TrendingController.php index 3c08594..0558488 100644 --- a/app/Controllers/TrendingController.php +++ b/app/Controllers/TrendingController.php @@ -8,7 +8,7 @@ use App\Helpers\RSS; class TrendingController { static public function get() { - $cursor = Misc::getCursor(); + $cursor = Misc::getTtwid(); $page = $_GET['page'] ?? 0; $api = Misc::api(); $feed = $api->getTrending($cursor, $page); diff --git a/app/Helpers/Misc.php b/app/Helpers/Misc.php index 6a4ea36..940484e 100644 --- a/app/Helpers/Misc.php +++ b/app/Helpers/Misc.php @@ -9,6 +9,10 @@ class Misc { return isset($_GET['cursor']) && is_numeric($_GET['cursor']) ? (int) $_GET['cursor'] : 0; } + static public function getTtwid(): string { + return $_GET['cursor'] ?? ''; + } + static public function url(string $endpoint = '') { return self::env('APP_URL', '') . $endpoint; }