mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Reorganize project part 2
This commit is contained in:
19
controllers/CliController.php
Normal file
19
controllers/CliController.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace Grocy\Controllers;
|
||||
|
||||
use Grocy\Services\ApplicationService;
|
||||
use Grocy\Services\DatabaseMigrationService;
|
||||
|
||||
class CliController extends BaseController
|
||||
{
|
||||
public function RecreateDemo($request, $response, $args)
|
||||
{
|
||||
$applicationService = new ApplicationService();
|
||||
if ($applicationService->IsDemoInstallation())
|
||||
{
|
||||
$databaseMigrationService = new DatabaseMigrationService();
|
||||
$databaseMigrationService->RecreateDemo();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user