2018-01-27 18:38:56 +00:00
|
|
|
<?php
|
|
|
|
|
2021-01-08 16:25:40 +00:00
|
|
|
namespace Pterodactyl\Http\Requests\Api\Application\Eggs;
|
2018-01-27 18:38:56 +00:00
|
|
|
|
2018-02-24 17:11:57 +00:00
|
|
|
use Pterodactyl\Models\Egg;
|
2018-01-27 18:38:56 +00:00
|
|
|
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
|
|
|
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
|
|
|
|
2021-01-08 16:25:40 +00:00
|
|
|
class DeleteEggRequest extends ApplicationApiRequest
|
2018-01-27 18:38:56 +00:00
|
|
|
{
|
2021-01-24 01:17:35 +00:00
|
|
|
protected string $resource = AdminAcl::RESOURCE_EGGS;
|
|
|
|
protected int $permission = AdminAcl::WRITE;
|
2018-01-27 18:38:56 +00:00
|
|
|
|
|
|
|
public function resourceExists(): bool
|
|
|
|
{
|
2021-01-08 16:25:40 +00:00
|
|
|
$egg = $this->route()->parameter('egg');
|
|
|
|
|
|
|
|
return $egg instanceof Egg && $egg->exists;
|
2018-01-27 18:38:56 +00:00
|
|
|
}
|
|
|
|
}
|