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

@@ -3,6 +3,7 @@
namespace Grocy\Controllers;
use \Grocy\Services\DatabaseService;
use \Grocy\Services\ApplicationService;
class SystemApiController extends BaseApiController
{
@@ -10,9 +11,11 @@ class SystemApiController extends BaseApiController
{
parent::__construct($container);
$this->DatabaseService = new DatabaseService();
$this->ApplicationService = new ApplicationService();
}
protected $DatabaseService;
protected $ApplicationService;
public function GetDbChangedTime(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
@@ -38,4 +41,9 @@ class SystemApiController extends BaseApiController
}
}
}
public function GetSystemInfo(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
{
return $this->ApiResponse($this->ApplicationService->GetSystemInfo());
}
}