mirror of
https://github.com/koel/koel
synced 2024-12-25 03:53:05 +00:00
6f0db1620f
* Add "Recently Played" playlist * Apply fixes from StyleCI (#838)
23 lines
686 B
PHP
23 lines
686 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Interaction;
|
|
|
|
use App\Repositories\InteractionRepository;
|
|
use App\Services\InteractionService;
|
|
use Illuminate\Http\Request;
|
|
|
|
class RecentlyPlayedController extends Controller
|
|
{
|
|
private $interactionRepository;
|
|
|
|
public function __construct(InteractionService $interactionService, InteractionRepository $interactionRepository)
|
|
{
|
|
parent::__construct($interactionService);
|
|
$this->interactionRepository = $interactionRepository;
|
|
}
|
|
|
|
public function index(Request $request, ?int $count = null)
|
|
{
|
|
return response()->json($this->interactionRepository->getRecentlyPlayed($request->user(), $count));
|
|
}
|
|
}
|