mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
api snatches
This commit is contained in:
@@ -16,7 +16,10 @@ class SnatchController extends Controller
|
||||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$torrentId = $request->torrent_id;
|
||||
$request->validate([
|
||||
'torrent_id' => 'required',
|
||||
]);
|
||||
|
||||
$snatches = Snatch::query()->where('torrentid', $torrentId)->with(['user'])->paginate();
|
||||
$resource = SnatchResource::collection($snatches);
|
||||
$resource->additional(['card_titles' => Snatch::$cardTitles]);
|
||||
|
||||
Reference in New Issue
Block a user