diff --git a/app/Controllers/VideoController.php b/app/Controllers/VideoController.php index a68a1ce..00ee453 100644 --- a/app/Controllers/VideoController.php +++ b/app/Controllers/VideoController.php @@ -3,17 +3,17 @@ namespace App\Controllers; use App\Helpers\ErrorHandler; use App\Helpers\Misc; -use App\Models\ItemTemplate; +use App\Models\FeedTemplate; class VideoController { static public function get(string $video_id) { $api = Misc::api(); - $item = $api->getVideoByID($video_id); - if ($item->meta->success) { + $feed = $api->getVideoByID($video_id); + if ($feed->meta->success) { $latte = Misc::latte(); - $latte->render(Misc::getView('video'), new ItemTemplate($item->info->detail->nickname, $item)); + $latte->render(Misc::getView('video'), new FeedTemplate('Video', $feed)); } else { - ErrorHandler::show($item->meta); + ErrorHandler::show($feed->meta); } } } diff --git a/app/Models/ItemTemplate.php b/app/Models/ItemTemplate.php deleted file mode 100644 index b4b749d..0000000 --- a/app/Models/ItemTemplate.php +++ /dev/null @@ -1,14 +0,0 @@ -item = $item; - } -}