Skip to content

Commit 874d928

Browse files
committed
Correctly handle response from daemon for server stats; pterodactyl#2183
1 parent 4c558a8 commit 874d928

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

app/Transformers/Api/Client/StatsTransformer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ public function transform(array $data)
2727
'current_state' => Arr::get($data, 'state', 'stopped'),
2828
'is_suspended' => Arr::get($data, 'suspended', false),
2929
'resources' => [
30-
'memory_bytes' => Arr::get($data, 'resources.memory_bytes', 0),
31-
'cpu_absolute' => Arr::get($data, 'resources.cpu_absolute', 0),
32-
'disk_bytes' => Arr::get($data, 'resources.disk_bytes', 0),
33-
'network_rx_bytes' => Arr::get($data, 'resources.network.rx_bytes', 0),
34-
'network_tx_bytes' => Arr::get($data, 'resources.network.tx_bytes', 0),
30+
'memory_bytes' => Arr::get($data, 'memory_bytes', 0),
31+
'cpu_absolute' => Arr::get($data, 'cpu_absolute', 0),
32+
'disk_bytes' => Arr::get($data, 'disk_bytes', 0),
33+
'network_rx_bytes' => Arr::get($data, 'network.rx_bytes', 0),
34+
'network_tx_bytes' => Arr::get($data, 'network.tx_bytes', 0),
3535
],
3636
];
3737
}

0 commit comments

Comments
 (0)