mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Don't allow upgrade to react if it is not installed
This commit is contained in:
parent
ee73a60452
commit
ce12b181cf
@ -163,6 +163,11 @@ class AccountController extends BaseController
|
||||
public function update(UpdateAccountRequest $request, Account $account)
|
||||
{
|
||||
|
||||
$fi = new \FilesystemIterator(public_path('react'), \FilesystemIterator::SKIP_DOTS);
|
||||
|
||||
if(iterator_count($fi) < 30)
|
||||
return response()->json(['message' => 'React App Not Installed, Please install the React app before attempting to switch.'], 400);
|
||||
|
||||
$account->fill($request->all());
|
||||
$account->save();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user