1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-25 10:32:31 +01:00

api(client): allow setting empty server description

Closes https://github.com/pterodactyl/panel/issues/4752
This commit is contained in:
Matthew Penner 2023-08-22 15:02:56 -10:00 committed by GitHub
commit 5cd2697be3
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
{
$name = $request->input('name');
$description = $request->input('description') ?? $server->description;
$description = $request->has('description') ? (string) $request->input('description') : $server->description;
$this->repository->update($server->id, [
'name' => $name,
'description' => $description,