mirror of
https://github.com/koel/koel
synced 2024-12-23 11:03:05 +00:00
23 lines
556 B
PHP
23 lines
556 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\API;
|
||
|
|
||
|
use App\Models\Album;
|
||
|
use App\Services\MediaMetadataService;
|
||
|
use Illuminate\Http\JsonResponse;
|
||
|
|
||
|
class AlbumThumbnailController extends Controller
|
||
|
{
|
||
|
private $mediaMetadataService;
|
||
|
|
||
|
public function __construct(MediaMetadataService $mediaMetadataService)
|
||
|
{
|
||
|
$this->mediaMetadataService = $mediaMetadataService;
|
||
|
}
|
||
|
|
||
|
public function get(Album $album): JsonResponse
|
||
|
{
|
||
|
return response()->json(['thumbnailUrl' => $this->mediaMetadataService->getAlbumThumbnailUrl($album)]);
|
||
|
}
|
||
|
}
|