mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
backend bonus log exclude seeding default
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Auth\Permission;
|
||||
use App\Http\Resources\SearchBoxResource;
|
||||
use App\Http\Resources\TorrentResource;
|
||||
use App\Models\SearchBox;
|
||||
use App\Repositories\SearchBoxRepository;
|
||||
use App\Repositories\UploadRepository;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -22,7 +24,7 @@ class UploadController extends Controller
|
||||
|
||||
public function sections(Request $request)
|
||||
{
|
||||
$sections = $this->searchBoxRepository->listSections();
|
||||
$sections = $this->searchBoxRepository->listSections(SearchBox::listAuthorizedSectionId());
|
||||
$resource = SearchBoxResource::collection($sections);
|
||||
return $this->success($resource);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Resources;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
|
||||
class BookmarkResource extends JsonResource
|
||||
{
|
||||
/**
|
||||
* Transform the resource into an array.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return array
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'torrent_id' => $this->torrentid,
|
||||
'user_id' => $this->userid,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user