Skip to content

Commit 2593e35

Browse files
committed
Add update info to serverinfo api call
Signed-off-by: Mathias Petermann <[email protected]>
1 parent 1dea4ef commit 2593e35

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/SystemStatistics.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ public function getSystemStatistics(): array {
5656
$memoryUsage = $this->os->getMemory();
5757
return [
5858
'version' => $this->config->getSystemValue('version'),
59+
'update' => [
60+
'available' => count(json_decode($this->config->getAppValue('core', 'lastupdateResult'))) > 0 ? 'yes' : 'no',
61+
'available_version' => json_decode($this->config->getAppValue('core', 'lastupdateResult'), true)['version'] ,
62+
'lastupdatedat' => (int) $this->config->getAppValue('core', 'lastupdatedat'),
63+
],
5964
'theme' => $this->config->getSystemValue('theme', 'none'),
6065
'enable_avatars' => $this->config->getSystemValue('enable_avatars', true) ? 'yes' : 'no',
6166
'enable_previews' => $this->config->getSystemValue('enable_previews', true) ? 'yes' : 'no',

0 commit comments

Comments
 (0)