Using new wrapper

This commit is contained in:
Pablo Ferreiro 2022-02-13 22:21:08 +01:00
parent 19e2c32c77
commit a3ebb08d26
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
22 changed files with 141 additions and 154 deletions

View file

@ -9,8 +9,9 @@ use App\Helpers\RSS;
class TrendingController {
static public function get() {
$cursor = Misc::getCursor();
$page = $_GET['page'] ?? 0;
$api = Misc::api();
$feed = $api->getTrendingFeed($cursor);
$feed = $api->getTrending($cursor, $page);
if ($feed->meta->success) {
$latte = Misc::latte();
$latte->render(Misc::getView('trending'), new FeedTemplate('Trending', $feed));
@ -21,7 +22,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