mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 09:39:57 +00:00
20 lines
496 B
PHP
20 lines
496 B
PHP
<?php
|
|
|
|
namespace Grocy\Controllers;
|
|
|
|
use \Grocy\Services\ApplicationService;
|
|
use \Grocy\Services\DatabaseMigrationService;
|
|
|
|
class CliController extends BaseController
|
|
{
|
|
public function RecreateDemo(\Slim\Http\Request $request, \Slim\Http\Response $response, array $args)
|
|
{
|
|
$applicationService = new ApplicationService();
|
|
if ($applicationService->IsDemoInstallation())
|
|
{
|
|
$databaseMigrationService = new DatabaseMigrationService();
|
|
$databaseMigrationService->RecreateDemo();
|
|
}
|
|
}
|
|
}
|