Better handling of private accounts

This commit is contained in:
Pablo Ferreiro 2023-02-01 15:22:53 +01:00
parent e8ec0ab293
commit 5dea2468f8
4 changed files with 6 additions and 6 deletions

View file

@ -18,10 +18,6 @@ class UserController {
if ($user->ok()) { if ($user->ok()) {
$info = $user->getInfo(); $info = $user->getInfo();
$feed = $user->getFeed(); $feed = $user->getFeed();
if ($info->detail->privateAccount) {
ErrorHandler::showText(401, "Private account detected! Not supported");
return;
}
Wrappers::latte('user', new FullTemplate($info->detail->nickname, $info, $feed)); Wrappers::latte('user', new FullTemplate($info->detail->nickname, $info, $feed));
} else { } else {
ErrorHandler::showMeta($user->error()); ErrorHandler::showMeta($user->error());

View file

@ -1,7 +1,7 @@
{ {
"name": "pablouser1/proxitok", "name": "pablouser1/proxitok",
"description": "An alternative frontend for TikTok", "description": "An alternative frontend for TikTok",
"version": "2.4.5.0", "version": "2.4.6.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"type": "project", "type": "project",
"authors": [ "authors": [

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", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "818a3e623705c076822f3d895a0d99ca", "content-hash": "8536364f5905bc49a9a88d4fa3daa3be",
"packages": [ "packages": [
{ {
"name": "bramus/router", "name": "bramus/router",

View file

@ -12,6 +12,10 @@
</figure> </figure>
<p class="title">{$info->detail->uniqueId}</p> <p class="title">{$info->detail->uniqueId}</p>
<p class="subtitle">{include '../components/rss.latte'}</p> <p class="subtitle">{include '../components/rss.latte'}</p>
{if $info->detail->privateAccount}
<p><strong>Private account</strong></p>
{/if}
<p></p>
<p>{$info->detail->signature}</p> <p>{$info->detail->signature}</p>
<p>Following: {number($info->stats->followingCount)} / Followers: {number($info->stats->followerCount)}</p> <p>Following: {number($info->stats->followingCount)} / Followers: {number($info->stats->followerCount)}</p>
<p>Hearts: {number($info->stats->heartCount)} / Videos: {$info->stats->videoCount}</p> <p>Hearts: {number($info->stats->heartCount)} / Videos: {$info->stats->videoCount}</p>