forked from Alex/Pterodactyl-Panel
Renamed middleware, and fixed the test
This commit is contained in:
parent
013dde75ae
commit
ccf3e3511f
@ -109,7 +109,7 @@ class Kernel extends HttpKernel
|
||||
'can' => Authorize::class,
|
||||
'bindings' => SubstituteBindings::class,
|
||||
'recaptcha' => VerifyReCaptcha::class,
|
||||
'maintenance' => MaintenanceMiddleware::class,
|
||||
'node.maintenance' => MaintenanceMiddleware::class,
|
||||
|
||||
// Server specific middleware (used for authenticating access to resources)
|
||||
//
|
||||
|
@ -33,7 +33,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
->namespace($this->namespace . '\Auth')
|
||||
->group(base_path('routes/auth.php'));
|
||||
|
||||
Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'maintenance'])->prefix('/server/{server}')
|
||||
Route::middleware(['web', 'csrf', 'auth', 'server', 'subuser.auth', 'node.maintenance'])->prefix('/server/{server}')
|
||||
->namespace($this->namespace . '\Server')
|
||||
->group(base_path('routes/server.php'));
|
||||
|
||||
|
@ -46,7 +46,7 @@ class MaintenanceMiddlewareTest extends MiddlewareTestCase
|
||||
public function testHandleInMaintenanceMode()
|
||||
{
|
||||
$server = factory(Server::class)->make();
|
||||
$node = factory(Node::class)->make(['maintenance' => 1]);
|
||||
$node = factory(Node::class)->make(['maintenance_mode' => 1]);
|
||||
|
||||
$server->setRelation('node', $node);
|
||||
$this->setRequestAttribute('server', $server);
|
||||
|
Loading…
Reference in New Issue
Block a user