mirror of
https://github.com/koel/koel
synced 2024-12-24 11:33:05 +00:00
24 lines
686 B
PHP
24 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));
|
||
|
}
|
||
|
}
|