Don't allow upgrade to react if it is not installed
This commit is contained in:
parent
ee73a60452
commit
ce12b181cf
1 changed files with 5 additions and 0 deletions
|
|
@ -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…
Add table
Reference in a new issue