fix: routing, switch back to old one

This commit is contained in:
Andras Bacsai
2023-12-27 16:45:01 +01:00
parent 8c20c833ba
commit f03aa57758
70 changed files with 961 additions and 322 deletions

View File

@@ -19,7 +19,7 @@ class Delete extends Component
return;
}
$this->server->delete();
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -15,7 +15,7 @@ class Show extends Component
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@@ -43,7 +43,7 @@ class LogDrains extends Component
try {
$server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
$this->server = $server;
} catch (\Throwable $e) {

View File

@@ -93,7 +93,7 @@ class ByIp extends Component
$server->settings->is_swarm_worker = $this->is_swarm_worker;
$server->settings->save();
$server->addInitialNetwork();
return $this->redirectRoute('server.show', $server->uuid);
return redirect()->route('server.show', $server->uuid);
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -17,7 +17,7 @@ class Show extends Component
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
$this->privateKeys = PrivateKey::ownedByCurrentTeam()->get()->where('is_git_related', false);
} catch (\Throwable $e) {

View File

@@ -15,7 +15,7 @@ class Logs extends Component
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@@ -20,7 +20,7 @@ class Show extends Component
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {
return handleError($e, $this);

View File

@@ -17,7 +17,7 @@ class Show extends Component
try {
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
if (is_null($this->server)) {
return $this->redirectRoute('server.all', navigate: true);
return redirect()->route('server.all');
}
} catch (\Throwable $e) {