Add more application api routes for Nests
This commit is contained in:
parent
b1d30c1bde
commit
0511f75747
7 changed files with 205 additions and 5 deletions
20
app/Http/Requests/Api/Application/Nests/GetNestRequest.php
Normal file
20
app/Http/Requests/Api/Application/Nests/GetNestRequest.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Api\Application\Nests;
|
||||
|
||||
use Pterodactyl\Models\Nest;
|
||||
|
||||
class GetNestRequest extends GetNestsRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the requested role exists on the Panel.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
$nest = $this->route()->parameter('nest');
|
||||
|
||||
return $nest instanceof Nest && $nest->exists;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue