Add testing routes
This commit is contained in:
parent
660c85aa97
commit
553c4f6b09
2 changed files with 22 additions and 0 deletions
|
@ -62,6 +62,8 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
->prefix('/api/remote')
|
->prefix('/api/remote')
|
||||||
->scopeBindings()
|
->scopeBindings()
|
||||||
->group(base_path('routes/api-remote.php'));
|
->group(base_path('routes/api-remote.php'));
|
||||||
|
|
||||||
|
$this->duskBoot();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,4 +109,23 @@ class RouteServiceProvider extends ServiceProvider
|
||||||
)->by($key);
|
)->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 () => []);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Route;
|
||||||
use Pterodactyl\Http\Controllers\Base;
|
use Pterodactyl\Http\Controllers\Base;
|
||||||
use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
|
use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue