mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-20 03:08:11 +00:00
Increased coverage and fixed a nasty bug.
This commit is contained in:
@@ -23,7 +23,7 @@ class NewUserController extends Controller
|
||||
/**
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
* @@return \Illuminate\Http\RedirectResponse|\Illuminate\View\View
|
||||
*/
|
||||
public function index(AccountRepositoryInterface $repository)
|
||||
{
|
||||
@@ -45,6 +45,8 @@ class NewUserController extends Controller
|
||||
/**
|
||||
* @param NewUserFormRequest $request
|
||||
* @param AccountRepositoryInterface $repository
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse
|
||||
*/
|
||||
public function submit(NewUserFormRequest $request, AccountRepositoryInterface $repository)
|
||||
{
|
||||
@@ -97,20 +99,8 @@ class NewUserController extends Controller
|
||||
$creditCard = $repository->store($creditAccount);
|
||||
|
||||
// store meta for CC:
|
||||
AccountMeta::create(
|
||||
[
|
||||
'name' => 'ccType',
|
||||
'data' => 'monthlyFull',
|
||||
'account_id' => $creditCard->id,
|
||||
]
|
||||
);
|
||||
AccountMeta::create(
|
||||
[
|
||||
'name' => 'ccMonthlyPaymentDate',
|
||||
'data' => Carbon::now()->year . '-01-01',
|
||||
'account_id' => $creditCard->id,
|
||||
]
|
||||
);
|
||||
AccountMeta::create(['name' => 'ccType', 'data' => 'monthlyFull', 'account_id' => $creditCard->id,]);
|
||||
AccountMeta::create(['name' => 'ccMonthlyPaymentDate', 'data' => Carbon::now()->year . '-01-01', 'account_id' => $creditCard->id,]);
|
||||
|
||||
}
|
||||
Session::flash('success', 'New account(s) created!');
|
||||
|
Reference in New Issue
Block a user