mirror of
https://github.com/koel/koel
synced 2025-01-07 02:08:46 +00:00
25 lines
718 B
PHP
25 lines
718 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Interaction;
|
|
|
|
use App\Models\User;
|
|
use App\Repositories\InteractionRepository;
|
|
use App\Services\InteractionService;
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
|
|
class RecentlyPlayedController extends Controller
|
|
{
|
|
/** @param User $user */
|
|
public function __construct(
|
|
protected InteractionService $interactionService,
|
|
protected InteractionRepository $interactionRepository,
|
|
protected ?Authenticatable $user
|
|
) {
|
|
parent::__construct($interactionService, $user);
|
|
}
|
|
|
|
public function index(?int $count = null)
|
|
{
|
|
return response()->json($this->interactionRepository->getRecentlyPlayed($this->user, $count));
|
|
}
|
|
}
|