From b8f8eb710fe85428ea527ac9679dca2c35d13ce6 Mon Sep 17 00:00:00 2001 From: Pablo Ferreiro Date: Fri, 11 Mar 2022 23:24:13 +0100 Subject: [PATCH] More fixes --- app/Controllers/TrendingController.php | 2 +- app/Helpers/Misc.php | 4 ++++ app/Models/ItemTemplate.php | 14 ++++++++++++++ composer.json | 2 +- composer.lock | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 app/Models/ItemTemplate.php diff --git a/app/Controllers/TrendingController.php b/app/Controllers/TrendingController.php index b474d16..f9c77cc 100644 --- a/app/Controllers/TrendingController.php +++ b/app/Controllers/TrendingController.php @@ -28,7 +28,7 @@ class TrendingController { static public function rss() { $api = Misc::api(); - $feed = $api->getTrendingFeed(); + $feed = $api->getTrending(); if ($feed->meta->success) { $feed = RSS::build('/trending', 'Trending', 'Tiktok trending', $feed->items); // Setup headers diff --git a/app/Helpers/Misc.php b/app/Helpers/Misc.php index 22ee30b..6ab8149 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; } diff --git a/app/Models/ItemTemplate.php b/app/Models/ItemTemplate.php new file mode 100644 index 0000000..b4b749d --- /dev/null +++ b/app/Models/ItemTemplate.php @@ -0,0 +1,14 @@ +item = $item; + } +} diff --git a/composer.json b/composer.json index 5ff0c67..74a30da 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "pablouser1/proxitok", "description": "An alternative frontend for TikTok", - "version": "2.0.0.2", + "version": "2.0.0.3", "license": "AGPL-3.0-or-later", "type": "project", "homepage": "https://github.com/pablouser1/ProxiTok", diff --git a/composer.lock b/composer.lock index a343fb5..ed0b97b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "2e80bafe776f5af404ce602d03f554b6", + "content-hash": "4cef118e8b6abab34ab1af853d20598b", "packages": [ { "name": "bramus/router",