mirror of
https://github.com/koel/koel
synced 2024-12-23 11:03:05 +00:00
20 lines
509 B
PHP
20 lines
509 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\V6\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Requests\V6\API\DeleteSongsRequest;
|
|
use App\Services\SongService;
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
|
|
class DeleteSongsController extends Controller
|
|
{
|
|
public function __invoke(DeleteSongsRequest $request, SongService $service, Authenticatable $user)
|
|
{
|
|
$this->authorize('admin', $user);
|
|
|
|
$service->deleteSongs($request->songs);
|
|
|
|
return response()->noContent();
|
|
}
|
|
}
|