mirror of
https://github.com/koel/koel
synced 2024-12-23 19:13:06 +00:00
ab4f2210d1
* Add the API documentation * Apply fixes from StyleCI (#871)
26 lines
512 B
PHP
26 lines
512 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Download;
|
|
|
|
use App\Models\Playlist;
|
|
use Illuminate\Auth\Access\AuthorizationException;
|
|
|
|
/**
|
|
* @group 6. Download
|
|
*/
|
|
class PlaylistController extends Controller
|
|
{
|
|
/**
|
|
* Download a whole playlist.
|
|
*
|
|
* @response []
|
|
*
|
|
* @throws AuthorizationException
|
|
*/
|
|
public function show(Playlist $playlist)
|
|
{
|
|
$this->authorize('owner', $playlist);
|
|
|
|
return response()->download($this->downloadService->from($playlist));
|
|
}
|
|
}
|