1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 09:02:28 +01:00

api(client): keep existing server description when empty (#4619)

This commit is contained in:
Omar Kamel 2022-12-14 16:19:45 -05:00 committed by GitHub
parent ac53e7b061
commit e43da311fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,7 +35,7 @@ class SettingsController extends ClientApiController
public function rename(RenameServerRequest $request, Server $server): JsonResponse public function rename(RenameServerRequest $request, Server $server): JsonResponse
{ {
$name = $request->input('name'); $name = $request->input('name');
$description = $request->input('description') ?? ''; $description = $request->input('description') ?? $server->description;
$this->repository->update($server->id, [ $this->repository->update($server->id, [
'name' => $name, 'name' => $name,
'description' => $description, 'description' => $description,