Fix server transformer

Properly pass the value to wings
This commit is contained in:
AreYouScared 2020-03-29 16:55:06 -04:00
parent 2561e3e8d5
commit b351c07d34
3 changed files with 4 additions and 1 deletions

View File

@ -105,6 +105,7 @@ class Server extends Validable
'swap' => 'required|numeric|min:-1',
'io' => 'required|numeric|between:10,1000',
'cpu' => 'required|numeric|min:0',
'threads' => 'present|nullable|regex:/^([\d-,]+)$/',
'oom_disabled' => 'sometimes|boolean',
'disk' => 'required|numeric|min:0',
'allocation_id' => 'required|bail|unique:servers|exists:allocations,id',
@ -134,6 +135,7 @@ class Server extends Validable
'disk' => 'integer',
'io' => 'integer',
'cpu' => 'integer',
'threads' => 'string',
'oom_disabled' => 'boolean',
'allocation_id' => 'integer',
'nest_id' => 'integer',

View File

@ -81,7 +81,7 @@ class ServerConfigurationStructureService
'swap' => $server->swap,
'io_weight' => $server->io,
'cpu_limit' => $server->cpu,
'cpu_threads' => $server->threads,
'threads' => $server->threads,
'disk_space' => $server->disk,
],
'service' => [

View File

@ -75,6 +75,7 @@ class ServerTransformer extends BaseTransformer
'disk' => $server->disk,
'io' => $server->io,
'cpu' => $server->cpu,
'threads' => $server->threads,
],
'feature_limits' => [
'databases' => $server->database_limit,