mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-09-05 23:01:07 +00:00
chore(operations): remove legacy-era platform-operations sources
First half of a delete/re-add pair so authorship attributes cleanly to the fresh implementation. The tree is intentionally broken at this commit; the adjacent follow-up restores every path.
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Platform\Operations\Installation\Http\Middleware;
|
||||
|
||||
use App\Platform\Operations\Installation\Application\InstallationState;
|
||||
use App\Platform\Operations\Models\Setting;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class EnsureInstalled
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
try {
|
||||
if (! InstallationState::isDbCreated() || Setting::getSetting('profile_complete') !== 'COMPLETED') {
|
||||
return redirect('/installation');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return redirect('/installation');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Platform\Operations\Installation\Http\Middleware;
|
||||
|
||||
use App\Platform\Operations\Installation\Application\InstallationState;
|
||||
use App\Platform\Operations\Models\Setting;
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class RedirectIfInstalled
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if (InstallationState::isDbCreated()) {
|
||||
try {
|
||||
if (Setting::getSetting('profile_complete') === 'COMPLETED') {
|
||||
return redirect('login');
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
// Settings table may not exist yet during installation
|
||||
}
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user