From b38b8f64657ca1283f282787e7dc629db6201558 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 17 Jan 2021 16:02:11 -0800 Subject: [PATCH] Mark some fields as deprecated in the API --- app/Transformers/Api/Application/ServerTransformer.php | 3 +++ app/Transformers/Api/Client/ServerTransformer.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/app/Transformers/Api/Application/ServerTransformer.php b/app/Transformers/Api/Application/ServerTransformer.php index 70a346247..08fdd9b1c 100644 --- a/app/Transformers/Api/Application/ServerTransformer.php +++ b/app/Transformers/Api/Application/ServerTransformer.php @@ -66,6 +66,8 @@ class ServerTransformer extends BaseTransformer 'identifier' => $server->uuidShort, 'name' => $server->name, 'description' => $server->description, + 'status' => $server->status, + // This field is deprecated, please use "status". 'suspended' => $server->isSuspended(), 'limits' => [ 'memory' => $server->memory, @@ -88,6 +90,7 @@ class ServerTransformer extends BaseTransformer 'container' => [ 'startup_command' => $server->startup, 'image' => $server->image, + // This field is deprecated, please use "status". 'installed' => $server->isInstalled() ? 1 : 0, 'environment' => $this->environmentService->handle($server), ], diff --git a/app/Transformers/Api/Client/ServerTransformer.php b/app/Transformers/Api/Client/ServerTransformer.php index 79102bb33..18124325d 100644 --- a/app/Transformers/Api/Client/ServerTransformer.php +++ b/app/Transformers/Api/Client/ServerTransformer.php @@ -70,7 +70,10 @@ class ServerTransformer extends BaseClientTransformer 'allocations' => $server->allocation_limit, 'backups' => $server->backup_limit, ], + 'status' => $server->status, + // This field is deprecated, please use "status". 'is_suspended' => $server->isSuspended(), + // This field is deprecated, please use "status". 'is_installing' => ! $server->isInstalled(), 'is_transferring' => ! is_null($server->transfer), ];