Skip to content

Commit

Permalink
Add update info to serverinfo api call
Browse files Browse the repository at this point in the history
Signed-off-by: Mathias Petermann <mathias.petermann@gmail.com>
  • Loading branch information
peschmae committed Apr 9, 2023
1 parent 1dea4ef commit aa4743d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/SystemStatistics.php
Expand Up @@ -56,6 +56,11 @@ public function getSystemStatistics(): array {
$memoryUsage = $this->os->getMemory();
return [
'version' => $this->config->getSystemValue('version'),
'update' => [
'available' => count(json_decode($this->config->getAppValue( 'core', 'lastupdateResult' ))) > 0 ? 'yes' : 'no',
'available_version' => json_decode($this->config->getAppValue( 'core', 'lastupdateResult' ), true)['version'] ,
'lastupdatedat' => (int) $this->config->getAppValue('core', 'lastupdatedat'),
],
'theme' => $this->config->getSystemValue('theme', 'none'),
'enable_avatars' => $this->config->getSystemValue('enable_avatars', true) ? 'yes' : 'no',
'enable_previews' => $this->config->getSystemValue('enable_previews', true) ? 'yes' : 'no',
Expand Down

0 comments on commit aa4743d

Please sign in to comment.