Misc fixes

This commit is contained in:
Dane Everitt
2017-10-08 21:36:22 -05:00
parent 864513c44b
commit aaf96669d4
15 changed files with 58 additions and 57 deletions

View File

@@ -32,22 +32,22 @@ class EggConfigurationService
/**
* Return an Egg file to be used by the Daemon.
*
* @param int|\Pterodactyl\Models\Egg $option
* @param int|\Pterodactyl\Models\Egg $egg
* @return array
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
*/
public function handle($option): array
public function handle($egg): array
{
if (! $option instanceof Egg) {
$option = $this->repository->getWithCopyAttributes($option);
if (! $egg instanceof Egg) {
$egg = $this->repository->getWithCopyAttributes($egg);
}
return [
'startup' => json_decode($option->inherit_config_startup),
'stop' => $option->inherit_config_stop,
'configs' => json_decode($option->inherit_config_files),
'log' => json_decode($option->inherit_config_logs),
'startup' => json_decode($egg->inherit_config_startup),
'stop' => $egg->inherit_config_stop,
'configs' => json_decode($egg->inherit_config_files),
'log' => json_decode($egg->inherit_config_logs),
'query' => 'none',
];
}

View File

@@ -51,6 +51,7 @@ class EggExporterService
'author' => $egg->author,
'description' => $egg->description,
'image' => $egg->docker_image,
'startup' => $egg->startup,
'config' => [
'files' => $egg->inherit_config_files,
'startup' => $egg->inherit_config_startup,

View File

@@ -89,6 +89,7 @@ class EggImporterService
$egg = $this->repository->create([
'uuid' => Uuid::uuid4()->toString(),
'nest_id' => $nest->id,
'author' => object_get($parsed, 'author'),
'name' => object_get($parsed, 'name'),
'description' => object_get($parsed, 'description'),
'docker_image' => object_get($parsed, 'image'),