mirror of
https://github.com/pelican-dev/panel.git
synced 2025-05-20 20:24:44 +02:00
This is no longer needed
This commit is contained in:
parent
cd9044753f
commit
3d740907db
@ -17,9 +17,6 @@ class SubstituteClientBindings extends SubstituteBindings
|
|||||||
public function handle($request, Closure $next): mixed
|
public function handle($request, Closure $next): mixed
|
||||||
{
|
{
|
||||||
// Override default behavior of the model binding to use a specific table column rather than the default 'id'.
|
// Override default behavior of the model binding to use a specific table column rather than the default 'id'.
|
||||||
$this->router->bind('server', function ($value) {
|
|
||||||
return $this->server->query()->where(strlen($value) === 8 ? 'uuidShort' : 'uuid', $value)->firstOrFail();
|
|
||||||
});
|
|
||||||
|
|
||||||
$this->router->bind('user', function ($value, $route) {
|
$this->router->bind('user', function ($value, $route) {
|
||||||
/** @var \App\Models\Subuser $match */
|
/** @var \App\Models\Subuser $match */
|
||||||
|
@ -51,7 +51,7 @@ Route::prefix('/account')->middleware(AccountSubject::class)->group(function ()
|
|||||||
| Endpoint: /api/client/servers/{server}
|
| Endpoint: /api/client/servers/{server}
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
Route::prefix('/servers/{server}')->middleware(ServerSubject::class, AuthenticateServerAccess::class, ResourceBelongsToServer::class)->group(function () {
|
Route::prefix('/servers/{server:uuid}')->middleware([ServerSubject::class, AuthenticateServerAccess::class, ResourceBelongsToServer::class])->group(function () {
|
||||||
Route::get('/', [Client\Servers\ServerController::class, 'index'])->name('api:client:server.view');
|
Route::get('/', [Client\Servers\ServerController::class, 'index'])->name('api:client:server.view');
|
||||||
Route::get('/websocket', Client\Servers\WebsocketController::class)->name('api:client:server.ws');
|
Route::get('/websocket', Client\Servers\WebsocketController::class)->name('api:client:server.ws');
|
||||||
Route::get('/resources', Client\Servers\ResourceUtilizationController::class)->name('api:client:server.resources');
|
Route::get('/resources', Client\Servers\ResourceUtilizationController::class)->name('api:client:server.resources');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user