mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-09 06:00:31 +08:00
Fix redirecting in setup
This commit is contained in:
parent
13fade2773
commit
c4b3cc89b0
@ -52,6 +52,8 @@ SALT = 2c5ca184f017a9a1ffbd198ef69b0c0e
|
||||
#
|
||||
APP_KEY = base64:gkb/zouNF6UOSfnr/o+izVMS57WQS3+62YqZBuDyBhU=
|
||||
|
||||
FIRST_RUN = true
|
||||
|
||||
# Mail Configuration
|
||||
#
|
||||
# Leave MAIL_DRIVER empty to disable features involving sending emails.
|
||||
|
@ -76,6 +76,11 @@ class SetupController extends Controller
|
||||
'DB_PREFIX = '.$request->input('prefix'),
|
||||
$content
|
||||
);
|
||||
$content = str_replace(
|
||||
'FIRST_RUN = true',
|
||||
'',
|
||||
$content
|
||||
);
|
||||
File::put('..'.DIRECTORY_SEPARATOR.'.env', $content);
|
||||
|
||||
return redirect('setup/info');
|
||||
@ -251,6 +256,12 @@ class SetupController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
if (env('FIRST_RUN') && request()->is('/')) {
|
||||
return false;
|
||||
}
|
||||
// @codeCoverageIgnoreEnd
|
||||
|
||||
$existingTables = [];
|
||||
$tables = $tables ?: ['users', 'user_closet', 'players', 'textures', 'options'];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user