Fixed trending, added explanation on VERIFY_CODE
This commit is contained in:
parent
1e1376506c
commit
f1de8e979b
6 changed files with 65 additions and 9 deletions
|
|
@ -9,9 +9,15 @@ use App\Helpers\RSS;
|
|||
class TrendingController {
|
||||
static public function get() {
|
||||
$cursor = Misc::getTtwid();
|
||||
$page = $_GET['page'] ?? 0;
|
||||
$api = Misc::api();
|
||||
$feed = $api->getTrending($cursor, $page);
|
||||
|
||||
// Ttwid if normal, cursor if legacy
|
||||
if ($api::class === 'TikScraper\Api') {
|
||||
$cursor = Misc::getTtwid();
|
||||
} else {
|
||||
$cursor = Misc::getCursor();
|
||||
}
|
||||
$feed = $api->getTrending($cursor);
|
||||
if ($feed->meta->success) {
|
||||
$latte = Misc::latte();
|
||||
$latte->render(Misc::getView('trending'), new FeedTemplate('Trending', $feed));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue