Fix exception thrown when accessing /nests/:id/eggs/:id API endpoint
This commit is contained in:
parent
e7e50bc45d
commit
620c624e6f
3 changed files with 16 additions and 8 deletions
|
@ -2,6 +2,8 @@
|
|||
|
||||
namespace Pterodactyl\Http\Requests\Api\Application\Nests\Eggs;
|
||||
|
||||
use Pterodactyl\Models\Egg;
|
||||
use Pterodactyl\Models\Nest;
|
||||
use Pterodactyl\Services\Acl\Api\AdminAcl;
|
||||
use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest;
|
||||
|
||||
|
@ -24,6 +26,6 @@ class GetEggRequest extends ApplicationApiRequest
|
|||
*/
|
||||
public function resourceExists(): bool
|
||||
{
|
||||
return $this->getModel('nest')->id === $this->getModel('egg')->nest_id;
|
||||
return $this->getModel(Nest::class)->id === $this->getModel(Egg::class)->nest_id;
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue