api(application): relocate egg endpoints
This commit is contained in:
parent
5946210e18
commit
58cfa98b9c
23 changed files with 309 additions and 112 deletions
20
app/Http/Requests/Api/Application/Eggs/GetEggRequest.php
Normal file
20
app/Http/Requests/Api/Application/Eggs/GetEggRequest.php
Normal file
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
namespace Pterodactyl\Http\Requests\Api\Application\Eggs;
|
||||
|
||||
use Pterodactyl\Models\Egg;
|
||||
|
||||
class GetEggRequest extends GetEggsRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the requested egg exists on the Panel.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
$egg = $this->route()->parameter('egg');
|
||||
|
||||
return $egg instanceof Egg && $egg->exists;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue