mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 13:53:45 +02:00
Clean up routes and middleware checking
This commit is contained in:
@@ -19,7 +19,7 @@ class UserController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('api');
|
||||
//
|
||||
}
|
||||
|
||||
public function getAllUsers(Request $request)
|
||||
|
||||
@@ -20,11 +20,7 @@ class AccountsController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
$this->middleware('admin');
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
public function getIndex(Request $request)
|
||||
|
||||
@@ -15,11 +15,7 @@ class BaseController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
$this->middleware('admin');
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
public function getIndex(Request $request)
|
||||
|
||||
@@ -23,11 +23,7 @@ class ServersController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
$this->middleware('admin');
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
public function getIndex(Request $request)
|
||||
|
||||
@@ -64,7 +64,7 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->middleware('guest', ['except' => 'getLogout']);
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,9 +21,7 @@ class IndexController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,14 +38,7 @@ class AjaxController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
|
||||
// Routes in this file are also checked aganist the server middleware. If the user
|
||||
// does not have permission to view the server it will not load.
|
||||
$this->middleware('server');
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,14 +26,7 @@ class ServerController extends Controller
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
// All routes in this controller are protected by the authentication middleware.
|
||||
$this->middleware('auth');
|
||||
|
||||
// Routes in this file are also checked aganist the server middleware. If the user
|
||||
// does not have permission to view the server it will not load.
|
||||
$this->middleware('server');
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user