mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-28 05:44:45 +02:00
Fill previously existing egg
This commit is contained in:
parent
97ac0fe54b
commit
957638d4ac
@ -26,8 +26,11 @@ class EggImporterService
|
||||
$parsed = $this->parser->handle($file);
|
||||
|
||||
return $this->connection->transaction(function () use ($parsed) {
|
||||
$egg = (new Egg())->forceFill([
|
||||
'uuid' => Uuid::uuid4()->toString(),
|
||||
$uuid = $parsed['uuid'] ?? Uuid::uuid4()->toString();
|
||||
$egg = Egg::where('uuid', $uuid)->first() ?? new Egg();
|
||||
|
||||
$egg = $egg->forceFill([
|
||||
'uuid' => $uuid,
|
||||
'author' => Arr::get($parsed, 'author'),
|
||||
'copy_script_from' => null,
|
||||
]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user