Support functionality for per-egg features
This commit is contained in:
parent
7ec614ed2c
commit
7618f306bd
7 changed files with 70 additions and 20 deletions
|
@ -33,19 +33,15 @@ class EggUpdateService
|
|||
/**
|
||||
* Update a service option.
|
||||
*
|
||||
* @param int|\Pterodactyl\Models\Egg $egg
|
||||
* @param \Pterodactyl\Models\Egg $egg
|
||||
* @param array $data
|
||||
*
|
||||
* @throws \Pterodactyl\Exceptions\Model\DataValidationException
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
* @throws \Pterodactyl\Exceptions\Service\Egg\NoParentConfigurationFoundException
|
||||
*/
|
||||
public function handle($egg, array $data)
|
||||
public function handle(Egg $egg, array $data)
|
||||
{
|
||||
if (! $egg instanceof Egg) {
|
||||
$egg = $this->repository->find($egg);
|
||||
}
|
||||
|
||||
if (! is_null(array_get($data, 'config_from'))) {
|
||||
$results = $this->repository->findCountWhere([
|
||||
['nest_id', '=', $egg->nest_id],
|
||||
|
|
Reference in a new issue