More fixes

This commit is contained in:
Pablo Ferreiro 2022-03-11 23:24:13 +01:00
parent c62df9d631
commit b8f8eb710f
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
5 changed files with 21 additions and 3 deletions

View file

@ -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

View file

@ -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;
}

View 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;
}
}

View file

@ -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",

2
composer.lock generated
View file

@ -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",