proxitok/app/Controllers/DiscoverController.php
2022-09-03 14:01:03 +02:00

21 lines
522 B
PHP

<?php
namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Misc;
use App\Helpers\Wrappers;
use App\Models\FeedTemplate;
class DiscoverController {
static public function get() {
$api = Wrappers::api();
$feed = $api->discover();
if ($feed->meta->success) {
$latte = Wrappers::latte();
$latte->render(Misc::getView('discover'), new FeedTemplate('Discover', $feed));
} else {
ErrorHandler::showMeta($feed->meta);
}
}
}