Reverted to last usable version

This commit is contained in:
Pablo Ferreiro 2022-02-16 15:20:35 +01:00
parent 279a4f50c6
commit c47d6cd6d4
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
23 changed files with 149 additions and 144 deletions

View file

@ -12,12 +12,12 @@ class UserController {
$api = Misc::api();
$feed = $api->getUserFeed($username, $cursor);
if ($feed->meta->success) {
if ($feed->info->detail->privateAccount) {
if ($feed->info->detail->user->privateAccount) {
http_response_code(400);
echo 'Private account detected! Not supported';
}
$latte = Misc::latte();
$latte->render(Misc::getView('user'), new FeedTemplate($feed->info->detail->nickname, $feed));
$latte->render(Misc::getView('user'), new FeedTemplate($feed->info->detail->user->nickname, $feed));
} else {
ErrorHandler::show($feed->meta);
}
@ -27,7 +27,7 @@ class UserController {
$api = Misc::api();
$feed = $api->getUserFeed($username);
if ($feed->meta->success) {
$feed = RSS::build('/@'.$username, $feed->info->detail->nickname, $feed->info->detail->signature, $feed->items);
$feed = RSS::build('/@'.$username, $feed->info->detail->user->nickname, $feed->info->detail->user->signature, $feed->items);
// Setup headers
RSS::setHeaders('user.rss');
echo $feed;