Clean up routes and middleware checking
This commit is contained in:
parent
99a67127c9
commit
4ae8a45ed3
16 changed files with 321 additions and 101 deletions
|
@ -23,8 +23,13 @@ class CheckServer
|
|||
return redirect()->guest('auth/login');
|
||||
}
|
||||
|
||||
if (!Server::getByUUID($request->route()->server)) {
|
||||
return redirect('/');
|
||||
$server = Server::getByUUID($request->route()->server);
|
||||
if (!$server) {
|
||||
return redirect()->route('index');
|
||||
}
|
||||
|
||||
if ($server->installed !== 1) {
|
||||
return response()->view('errors.installing', [], 503);
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
|
Reference in a new issue