More fixes
This commit is contained in:
parent
c62df9d631
commit
b8f8eb710f
5 changed files with 21 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
14
app/Models/ItemTemplate.php
Normal file
14
app/Models/ItemTemplate.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
namespace App\Models;
|
||||
|
||||
/**
|
||||
* Base for templates with item (only /video at the time)
|
||||
*/
|
||||
class ItemTemplate extends BaseTemplate {
|
||||
public object $item;
|
||||
|
||||
function __construct(string $title, object $item) {
|
||||
parent::__construct($title);
|
||||
$this->item = $item;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue