koel/app/Http/Controllers/API/Interaction/BatchLikeController.php
2020-10-26 16:29:29 +01:00

23 lines
650 B
PHP

<?php
namespace App\Http\Controllers\API\Interaction;
use App\Http\Requests\API\BatchInteractionRequest;
use Illuminate\Http\Response;
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()->json(null, Response::HTTP_NO_CONTENT);
}
}