2020-06-12 13:55:45 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
|
2022-07-29 06:47:10 +00:00
|
|
|
use App\Http\Controllers\Controller;
|
2020-06-12 13:55:45 +00:00
|
|
|
use App\Models\Album;
|
|
|
|
use App\Services\MediaMetadataService;
|
|
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
|
|
|
|
class AlbumThumbnailController extends Controller
|
|
|
|
{
|
2022-07-29 06:47:10 +00:00
|
|
|
public function __construct(private MediaMetadataService $mediaMetadataService)
|
2020-06-12 13:55:45 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2021-05-21 17:14:00 +00:00
|
|
|
public function show(Album $album): JsonResponse
|
2020-06-12 13:55:45 +00:00
|
|
|
{
|
|
|
|
return response()->json(['thumbnailUrl' => $this->mediaMetadataService->getAlbumThumbnailUrl($album)]);
|
|
|
|
}
|
|
|
|
}
|