Move about dialog into separate view and add API endpoint for system info

This commit is contained in:
Bernd Bestel
2019-02-09 13:41:40 +01:00
parent b5ac319a90
commit 01e9e3f5ce
9 changed files with 143 additions and 44 deletions

View File

@@ -14,4 +14,17 @@ class ApplicationService extends BaseService
return $this->InstalledVersion;
}
public function GetSystemInfo()
{
$pdo = new \PDO('sqlite::memory:');
$sqliteVersion = $pdo->query('SELECT sqlite_version()')->fetch()[0];
$pdo = null;
return array(
'grocy_version' => $this->GetInstalledVersion(),
'php_version' => phpversion(),
'sqlite_version' => $sqliteVersion
);
}
}