diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index f5ac5565d..ad0bc16a9 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -62,6 +62,8 @@ class RouteServiceProvider extends ServiceProvider ->prefix('/api/remote') ->scopeBindings() ->group(base_path('routes/api-remote.php')); + + $this->duskBoot(); }); } @@ -107,4 +109,23 @@ class RouteServiceProvider extends ServiceProvider )->by($key); }); } + + // Node Ping Test Helper + private function duskBoot() + { + if (!app()->environment('dusk')) { + return; + } + + // Simulate Node Ping + Route::get('/api/system', fn () => [ + 'version' => '1.7.0', + 'kernel_version' => '5.4.0-126-generic', + 'architecture' => 'amd64', + 'os' => 'linux', + 'cpu_count' => 2, + ]); + + Route::post('/api/servers', fn () => []); + } } diff --git a/routes/base.php b/routes/base.php index 1d3ad66a6..93f45b577 100644 --- a/routes/base.php +++ b/routes/base.php @@ -1,5 +1,6 @@