Use the current user as the new author

This commit is contained in:
Lance Pioch 2024-05-07 22:00:40 -04:00
parent 1b3017222e
commit 8f4b68617a
3 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,6 @@ class InfoCommand extends Command
['Panel Version', config('app.version')], ['Panel Version', config('app.version')],
['Latest Version', $this->versionService->getPanel()], ['Latest Version', $this->versionService->getPanel()],
['Up-to-Date', $this->versionService->isLatestPanel() ? 'Yes' : $this->formatText('No', 'bg=red')], ['Up-to-Date', $this->versionService->isLatestPanel() ? 'Yes' : $this->formatText('No', 'bg=red')],
['Unique Identifier', config('panel.service.author')],
], 'compact'); ], 'compact');
$this->output->title('Application Configuration'); $this->output->title('Application Configuration');

View File

@ -56,6 +56,7 @@ class EggController extends Controller
{ {
$data = $request->validated(); $data = $request->validated();
$data['docker_images'] = $this->normalizeDockerImages($data['docker_images'] ?? null); $data['docker_images'] = $this->normalizeDockerImages($data['docker_images'] ?? null);
$data['author'] = $request->user()->email;
$egg = $this->creationService->handle($data); $egg = $this->creationService->handle($data);
$this->alert->success(trans('admin/eggs.notices.egg_created'))->flash(); $this->alert->success(trans('admin/eggs.notices.egg_created'))->flash();

View File

@ -24,7 +24,6 @@ class EggCreationService
return Egg::query()->create(array_merge($data, [ return Egg::query()->create(array_merge($data, [
'uuid' => Uuid::uuid4()->toString(), 'uuid' => Uuid::uuid4()->toString(),
'author' => config('panel.service.author'),
])); ]));
} }
} }