mirror of
https://github.com/grocy/grocy.git
synced 2025-08-13 01:06:23 +00:00
Move about dialog into separate view and add API endpoint for system info
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user