Instance-level proxy and test endpoint fix

This commit is contained in:
Pablo Ferreiro 2022-02-20 16:25:15 +01:00
parent 279a4f50c6
commit d60e4400a2
No known key found for this signature in database
GPG key ID: 41FBCE65B779FA24
9 changed files with 42 additions and 33 deletions

View file

@ -8,7 +8,7 @@ use App\Models\SettingsTemplate;
class SettingsController {
static public function index() {
$latte = Misc::latte();
$latte->render(Misc::getView('settings'), new SettingsTemplate());
$latte->render(Misc::getView('settings'), new SettingsTemplate);
}
static public function proxy() {

View file

@ -13,8 +13,9 @@ class UserController {
$feed = $api->getUserFeed($username, $cursor);
if ($feed->meta->success) {
if ($feed->info->detail->privateAccount) {
http_response_code(400);
http_response_code(403);
echo 'Private account detected! Not supported';
exit;
}
$latte = Misc::latte();
$latte->render(Misc::getView('user'), new FeedTemplate($feed->info->detail->nickname, $feed));