Fixed bug "Maintenance Mode while updating"

This commit is contained in:
Julian Prieber 2022-08-08 15:30:28 +02:00
parent edc2f548c9
commit bcaf3593b9

View File

@ -17,12 +17,8 @@ use App\Http\Controllers\UserController;
|
*/
// Displays Maintenance Mode page
if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){
Route::get('/{any}', function () {
return view('maintenance');
})->where('any', '.*');
} else {
// Disables routes if in Maintenance Mode
if(env('MAINTENANCE_MODE') != 'true' and !file_exists(base_path("storage/MAINTENANCE"))){
// Prevents section below from being run by 'composer update'
if(file_exists(base_path('storage/app/ISINSTALLED'))){
@ -164,4 +160,11 @@ Route::get('/updating', function (\Codedge\Updater\UpdaterManager $updater) {
});
// Displays Maintenance Mode page
if(env('MAINTENANCE_MODE') == 'true' or file_exists(base_path("storage/MAINTENANCE"))){
Route::get('/{any}', function () {
return view('maintenance');
})->where('any', '.*');
}
require __DIR__.'/auth.php';