mirror of
https://github.com/koel/koel
synced 2024-12-23 19:13:06 +00:00
20 lines
564 B
PHP
20 lines
564 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Http\Requests\API\UpdateUserPreferencesRequest;
|
|
use App\Models\User;
|
|
use App\Services\UserService;
|
|
use Illuminate\Contracts\Auth\Authenticatable;
|
|
|
|
class UpdateUserPreferenceController extends Controller
|
|
{
|
|
/** @param User $user */
|
|
public function __invoke(UpdateUserPreferencesRequest $request, UserService $service, Authenticatable $user)
|
|
{
|
|
$service->savePreference($user, $request->key, $request->value);
|
|
|
|
return response()->noContent();
|
|
}
|
|
}
|