Fix exception thrown when accessing /nests/:id/eggs/:id API endpoint

This commit is contained in:
Dane Everitt 2018-02-24 11:11:57 -06:00
parent e7e50bc45d
commit 620c624e6f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 16 additions and 8 deletions

View file

@ -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;
}
}