mirror of
https://github.com/grocy/grocy.git
synced 2026-04-07 21:26:16 +02:00
More fixes following merge
This commit is contained in:
parent
8d4b8c91d7
commit
a0e0870f1a
10
routes.php
10
routes.php
|
|
@ -5,12 +5,6 @@ use \Grocy\Middleware\SessionAuthMiddleware;
|
||||||
use \Grocy\Middleware\ApiKeyAuthMiddleware;
|
use \Grocy\Middleware\ApiKeyAuthMiddleware;
|
||||||
use \Tuupola\Middleware\CorsMiddleware;
|
use \Tuupola\Middleware\CorsMiddleware;
|
||||||
|
|
||||||
$main_route_time_start = microtime(true);
|
|
||||||
|
|
||||||
$session_cookie_name = $appContainer->LoginControllerInstance->GetSessionCookieName();
|
|
||||||
|
|
||||||
$session_auth_middelware = new SessionAuthMiddleware($appContainer, $session_cookie_name);
|
|
||||||
|
|
||||||
$app->group('', function()
|
$app->group('', function()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -127,9 +121,7 @@ $app->group('', function()
|
||||||
$this->get('/api', '\Grocy\Controllers\OpenApiController:DocumentationUi');
|
$this->get('/api', '\Grocy\Controllers\OpenApiController:DocumentationUi');
|
||||||
$this->get('/manageapikeys', '\Grocy\Controllers\OpenApiController:ApiKeysList');
|
$this->get('/manageapikeys', '\Grocy\Controllers\OpenApiController:ApiKeysList');
|
||||||
$this->get('/manageapikeys/new', '\Grocy\Controllers\OpenApiController:CreateNewApiKey');
|
$this->get('/manageapikeys/new', '\Grocy\Controllers\OpenApiController:CreateNewApiKey');
|
||||||
|
})->add(new SessionAuthMiddleware($appContainer, $appContainer->LoginControllerInstance->GetSessionCookieName()));
|
||||||
})->add($session_auth_middelware);
|
|
||||||
|
|
||||||
|
|
||||||
$app->group('/api', function()
|
$app->group('/api', function()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,6 @@ class ApplicationService extends BaseService
|
||||||
{
|
{
|
||||||
private $InstalledVersion;
|
private $InstalledVersion;
|
||||||
|
|
||||||
#private function __construct()
|
|
||||||
#{
|
|
||||||
# parent::__construct();
|
|
||||||
#}
|
|
||||||
|
|
||||||
public function GetInstalledVersion()
|
public function GetInstalledVersion()
|
||||||
{
|
{
|
||||||
if ($this->InstalledVersion == null)
|
if ($this->InstalledVersion == null)
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,11 @@ class DemoDataGeneratorService extends BaseService
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->getLocalizationService() = new LocalizationService(GROCY_CULTURE);
|
$this->LocalizationService = new LocalizationService(GROCY_CULTURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected $LocalizationService;
|
||||||
|
|
||||||
public function PopulateDemoData()
|
public function PopulateDemoData()
|
||||||
{
|
{
|
||||||
$rowCount = $this->getDatabaseService()->ExecuteDbQuery('SELECT COUNT(*) FROM migrations WHERE migration = -1')->fetchColumn();
|
$rowCount = $this->getDatabaseService()->ExecuteDbQuery('SELECT COUNT(*) FROM migrations WHERE migration = -1')->fetchColumn();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user