mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-13 22:54:25 +01:00
Merge pull request #7557 from turbo124/v5-develop
Prevent activating react app without it being installed.
This commit is contained in:
commit
98d969bf83
@ -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();
|
||||
|
||||
|
@ -17,4 +17,15 @@
|
||||
|
||||
</body>
|
||||
|
||||
<!--
|
||||
|
||||
If you are reading this, there is a fair change that the react application has not loaded for you. There are a couple of solutions:
|
||||
|
||||
1. Download the release file from https://github.com/invoiceninja/invoiceninja and overwrite your current installation.
|
||||
2. Switch back to the Flutter application by editing the database, you can do this with the following SQL
|
||||
|
||||
UPDATE accounts SET
|
||||
set_react_as_default_ap = 0;
|
||||
|
||||
-->
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user