proxitok/app/Controllers/MusicController.php
Pablo Ferreiro ee6e8b0593
Revert "Added better og support"
This reverts commit fa3f1e0a7c.
2022-11-26 23:36:20 +01:00

24 lines
586 B
PHP

<?php
namespace App\Controllers;
use App\Helpers\ErrorHandler;
use App\Helpers\Misc;
use App\Helpers\Wrappers;
use App\Models\FullTemplate;
class MusicController {
static public function get(string $music_id) {
$cursor = Misc::getCursor();
$api = Wrappers::api();
$music = $api->music($music_id);
$music->feed($cursor);
if ($music->ok()) {
$data = $music->getFull();
Wrappers::latte('music', new FullTemplate('Music', $data));
} else {
ErrorHandler::showMeta($music->error());
}
}
}