diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 6e2d2dd13..2ee187c69 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -22,16 +22,16 @@ class RouteServiceProvider extends ServiceProvider public function map() { Route::middleware(['web', 'auth', 'csrf']) - ->namespace($this->namespace . '\Base') - ->group(base_path('routes/base.php')); + ->namespace($this->namespace . '\Base') + ->group(base_path('routes/base.php')); Route::middleware(['web', 'auth', 'admin', 'csrf'])->prefix('/admin') - ->namespace($this->namespace . '\Admin') - ->group(base_path('routes/admin.php')); + ->namespace($this->namespace . '\Admin') + ->group(base_path('routes/admin.php')); Route::middleware(['web', 'csrf'])->prefix('/auth') - ->namespace($this->namespace . '\Auth') - ->group(base_path('routes/auth.php')); + ->namespace($this->namespace . '\Auth') + ->group(base_path('routes/auth.php')); Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'node.maintenance']) ->prefix('/api/server/{server}') @@ -51,7 +51,7 @@ class RouteServiceProvider extends ServiceProvider ->group(base_path('routes/api-remote.php')); Route::middleware(['web', 'daemon-old'])->prefix('/daemon') - ->namespace($this->namespace . '\Daemon') - ->group(base_path('routes/daemon.php')); + ->namespace($this->namespace . '\Daemon') + ->group(base_path('routes/daemon.php')); } } diff --git a/routes/base.php b/routes/base.php index 39d07d6d6..dbdad9712 100644 --- a/routes/base.php +++ b/routes/base.php @@ -1,17 +1,8 @@ name('index'); +Route::get('/', 'IndexController@index')->name('index')->fallback(); Route::get('/account', 'IndexController@index')->name('account'); -/* -|-------------------------------------------------------------------------- -| Account Controller Routes -|-------------------------------------------------------------------------- -| -| Endpoint: /account -| -*/ - /* |-------------------------------------------------------------------------- | Account API Controller Routes @@ -23,9 +14,7 @@ Route::get('/account', 'IndexController@index')->name('account'); Route::group(['prefix' => 'account/api'], function () { Route::get('/', 'ClientApiController@index')->name('account.api'); Route::get('/new', 'ClientApiController@create')->name('account.api.new'); - Route::post('/new', 'ClientApiController@store'); - Route::delete('/revoke/{identifier}', 'ClientApiController@delete')->name('account.api.revoke'); }); @@ -43,5 +32,5 @@ Route::group(['prefix' => 'account/two_factor'], function () { Route::post('/totp/disable', 'SecurityController@delete')->name('account.two_factor.disable'); }); -// Catch any other combinations of routes and pass them off to the Vuejs component. -Route::fallback('IndexController@index'); +Route::get('/{vue}', 'IndexController@index') + ->where('vue', '^(?!(\/)?(api|admin|daemon)).+');