mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-13 03:43:45 +02:00
Finish putting permissions on the API
This commit is contained in:
21
app/Http/Requests/API/Admin/Nodes/GetNodeRequest.php
Normal file
21
app/Http/Requests/API/Admin/Nodes/GetNodeRequest.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\API\Admin\Nodes;
|
||||
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Http\Requests\API\Admin\ApiAdminRequest;
|
||||
|
||||
class GetNodeRequest extends ApiAdminRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the requested node exists on the Panel.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
$node = $this->route()->parameter('node');
|
||||
|
||||
return $node instanceof Node && $node->exists;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user