mirror of
https://github.com/koel/koel
synced 2024-12-12 13:42:27 +00:00
20 lines
571 B
PHP
20 lines
571 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Requests\API\MovePlaylistSongsRequest;
|
|
use App\Models\Playlist;
|
|
use App\Services\PlaylistService;
|
|
|
|
class MovePlaylistSongsController extends Controller
|
|
{
|
|
public function __invoke(MovePlaylistSongsRequest $request, Playlist $playlist, PlaylistService $service)
|
|
{
|
|
$this->authorize('collaborate', $playlist);
|
|
|
|
$service->movePlayablesInPlaylist($playlist, $request->songs, $request->target, $request->type);
|
|
|
|
return response()->noContent();
|
|
}
|
|
}
|