mirror of
https://github.com/koel/koel
synced 2024-12-22 18:43:21 +00:00
21 lines
584 B
PHP
21 lines
584 B
PHP
|
<?php
|
||
|
|
||
|
namespace App\Http\Controllers\API;
|
||
|
|
||
|
use App\Http\Controllers\Controller;
|
||
|
use App\Http\Requests\API\UpdatePlaybackStatusRequest;
|
||
|
use App\Models\User;
|
||
|
use App\Services\QueueService;
|
||
|
use Illuminate\Contracts\Auth\Authenticatable;
|
||
|
|
||
|
class UpdatePlaybackStatusController extends Controller
|
||
|
{
|
||
|
/** @param User $user */
|
||
|
public function __invoke(UpdatePlaybackStatusRequest $request, QueueService $queueService, Authenticatable $user)
|
||
|
{
|
||
|
$queueService->updatePlaybackStatus($user, $request->song, $request->position);
|
||
|
|
||
|
return response()->noContent();
|
||
|
}
|
||
|
}
|