koel/app/Http/Controllers/API/Interaction/BatchLikeController.php
2021-12-06 18:07:43 +01:00

22 lines
594 B
PHP

<?php
namespace App\Http\Controllers\API\Interaction;
use App\Http\Requests\API\BatchInteractionRequest;
class BatchLikeController extends Controller
{
public function store(BatchInteractionRequest $request)
{
$interactions = $this->interactionService->batchLike((array) $request->songs, $this->currentUser);
return response()->json($interactions);
}
public function destroy(BatchInteractionRequest $request)
{
$this->interactionService->batchUnlike((array) $request->songs, $this->currentUser);
return response()->noContent();
}
}