mirror of
https://github.com/pelican-dev/panel.git
synced 2025-09-08 08:08:54 +02:00
cleanup routes & middleware
This commit is contained in:
parent
a4db7512fb
commit
70e726ddc3
@ -19,7 +19,6 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
'auth:sanctum',
|
||||
\App\Http\Middleware\Api\IsValidJson::class,
|
||||
\App\Http\Middleware\Activity\TrackAPIKey::class,
|
||||
\App\Http\Middleware\RequireTwoFactorAuthentication::class,
|
||||
\App\Http\Middleware\Api\AuthenticateIPAccess::class,
|
||||
]);
|
||||
|
||||
|
@ -4,7 +4,6 @@ use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Controllers\Api\Client;
|
||||
use App\Http\Middleware\Activity\ServerSubject;
|
||||
use App\Http\Middleware\Activity\AccountSubject;
|
||||
use App\Http\Middleware\RequireTwoFactorAuthentication;
|
||||
use App\Http\Middleware\Api\Client\Server\ResourceBelongsToServer;
|
||||
use App\Http\Middleware\Api\Client\Server\AuthenticateServerAccess;
|
||||
|
||||
@ -20,12 +19,7 @@ Route::get('/', [Client\ClientController::class, 'index'])->name('api:client.ind
|
||||
Route::get('/permissions', [Client\ClientController::class, 'permissions']);
|
||||
|
||||
Route::prefix('/account')->middleware(AccountSubject::class)->group(function () {
|
||||
Route::prefix('/')->withoutMiddleware(RequireTwoFactorAuthentication::class)->group(function () {
|
||||
Route::get('/', [Client\AccountController::class, 'index'])->name('api:client.account');
|
||||
Route::get('/two-factor', [Client\TwoFactorController::class, 'index']);
|
||||
Route::post('/two-factor', [Client\TwoFactorController::class, 'store']);
|
||||
Route::delete('/two-factor', [Client\TwoFactorController::class, 'delete']);
|
||||
});
|
||||
Route::get('/', [Client\AccountController::class, 'index'])->name('api:client.account');
|
||||
|
||||
Route::put('/email', [Client\AccountController::class, 'updateEmail'])->name('api:client.account.update-email');
|
||||
Route::put('/password', [Client\AccountController::class, 'updatePassword'])->name('api:client.account.update-password');
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
use App\Livewire\Installer\PanelInstaller;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use App\Http\Middleware\RequireTwoFactorAuthentication;
|
||||
|
||||
Route::get('installer', PanelInstaller::class)->name('installer')
|
||||
->withoutMiddleware(['auth', RequireTwoFactorAuthentication::class]);
|
||||
->withoutMiddleware(['auth']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user