mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-05-03 20:56:21 +00:00
After quite some fumbling, fixed both the development import and some tests.
This commit is contained in:
@@ -20,6 +20,8 @@ class AccountController extends \BaseController
|
||||
public function index()
|
||||
{
|
||||
$all = $this->accounts->get();
|
||||
|
||||
|
||||
$list = [
|
||||
'personal' => [],
|
||||
'beneficiaries' => [],
|
||||
|
||||
@@ -13,6 +13,20 @@ class MigrationController extends BaseController
|
||||
|
||||
}
|
||||
|
||||
public function dev() {
|
||||
$file = Config::get('dev.import');
|
||||
if(file_exists($file)) {
|
||||
$user = User::find(1);
|
||||
Auth::login($user);
|
||||
/** @var Firefly\Helper\Migration\MigrationHelperInterface $migration */
|
||||
$migration = App::make('Firefly\Helper\Migration\MigrationHelperInterface');
|
||||
$migration->loadFile($file);
|
||||
if ($migration->validFile()) {
|
||||
$migration->migrate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
return View::make('migrate.index');
|
||||
|
||||
@@ -26,15 +26,7 @@ class UserController extends BaseController
|
||||
*/
|
||||
public function login()
|
||||
{
|
||||
// $user = User::find(1);
|
||||
// Auth::login($user);
|
||||
// /** @var Firefly\Helper\Migration\MigrationHelperInterface $migration */
|
||||
// $migration = App::make('Firefly\Helper\Migration\MigrationHelperInterface');
|
||||
// $file = '/Library/WebServer/Documents/projects/firefly-iii/app/storage/firefly-export-2014-07-06.json';
|
||||
// $migration->loadFile($file);
|
||||
// if($migration->validFile()) {
|
||||
// $migration->migrate();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
return View::make('user.login');
|
||||
|
||||
Reference in New Issue
Block a user