mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +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 \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()
|
||||
{
|
||||
|
||||
|
|
@ -127,9 +121,7 @@ $app->group('', function()
|
|||
$this->get('/api', '\Grocy\Controllers\OpenApiController:DocumentationUi');
|
||||
$this->get('/manageapikeys', '\Grocy\Controllers\OpenApiController:ApiKeysList');
|
||||
$this->get('/manageapikeys/new', '\Grocy\Controllers\OpenApiController:CreateNewApiKey');
|
||||
|
||||
})->add($session_auth_middelware);
|
||||
|
||||
})->add(new SessionAuthMiddleware($appContainer, $appContainer->LoginControllerInstance->GetSessionCookieName()));
|
||||
|
||||
$app->group('/api', function()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,11 +6,6 @@ class ApplicationService extends BaseService
|
|||
{
|
||||
private $InstalledVersion;
|
||||
|
||||
#private function __construct()
|
||||
#{
|
||||
# parent::__construct();
|
||||
#}
|
||||
|
||||
public function GetInstalledVersion()
|
||||
{
|
||||
if ($this->InstalledVersion == null)
|
||||
|
|
|
|||
|
|
@ -9,9 +9,11 @@ class DemoDataGeneratorService extends BaseService
|
|||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->getLocalizationService() = new LocalizationService(GROCY_CULTURE);
|
||||
$this->LocalizationService = new LocalizationService(GROCY_CULTURE);
|
||||
}
|
||||
|
||||
protected $LocalizationService;
|
||||
|
||||
public function PopulateDemoData()
|
||||
{
|
||||
$rowCount = $this->getDatabaseService()->ExecuteDbQuery('SELECT COUNT(*) FROM migrations WHERE migration = -1')->fetchColumn();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user