mirror of
https://github.com/koel/koel
synced 2024-12-04 09:49:23 +00:00
19 lines
465 B
PHP
19 lines
465 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\API\Interaction;
|
|
|
|
use App\Http\Requests\API\SongLikeRequest;
|
|
use Illuminate\Http\JsonResponse;
|
|
|
|
class LikeController extends Controller
|
|
{
|
|
/**
|
|
* Like or unlike a song as the currently authenticated user.
|
|
*
|
|
* @return JsonResponse
|
|
*/
|
|
public function store(SongLikeRequest $request)
|
|
{
|
|
return response()->json($this->interactionService->toggleLike($request->song, $request->user()));
|
|
}
|
|
}
|