proxitok/app/Controllers/VideoController.php
Pablo Ferreiro 9c95620384
Fixed /video
2022-03-11 23:39:56 +01:00

20 lines
504 B
PHP

<?php
namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Misc;
use App\Models\FeedTemplate;
class VideoController {
static public function get(string $video_id) {
$api = Misc::api();
$feed = $api->getVideoByID($video_id);
if ($feed->meta->success) {
$latte = Misc::latte();
$latte->render(Misc::getView('video'), new FeedTemplate('Video', $feed));
} else {
ErrorHandler::show($feed->meta);
}
}
}