Misc fixes
This commit is contained in:
parent
864513c44b
commit
aaf96669d4
15 changed files with 58 additions and 57 deletions
|
@ -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',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'),
|
||||
|
|
|
@ -72,7 +72,7 @@ class ServerConfigurationStructureService
|
|||
],
|
||||
'keys' => [],
|
||||
'service' => [
|
||||
'option' => $server->option->uuid,
|
||||
'egg' => $server->egg->uuid,
|
||||
'pack' => object_get($server, 'pack.uuid'),
|
||||
'skip_scripts' => $server->skip_scripts,
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue