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

@@ -35,7 +35,7 @@ class Change extends Component
if ($this->private_key->isEmpty()) {
$this->private_key->delete();
currentTeam()->privateKeys = PrivateKey::where('team_id', currentTeam()->id)->get();
return $this->redirectRoute('security.private-key.index', navigate: true);
return redirect()->route('security.private-key.index');
}
$this->dispatch('error', 'This private key is in use and cannot be deleted. Please delete all servers, applications, and GitHub/GitLab apps that use this private key before deleting it.');
} catch (\Throwable $e) {

View File

@@ -67,9 +67,9 @@ class Create extends Component
'team_id' => currentTeam()->id
]);
if ($this->from === 'server') {
return $this->redirectRoute('server.create', navigate: true);
return redirect()->route('server.create');
}
return $this->redirectRoute('security.private-key.show', ['private_key_uuid' => $private_key->uuid], navigate: true);
return redirect()->route('security.private-key.show', ['private_key_uuid' => $private_key->uuid]);
} catch (\Throwable $e) {
return handleError($e, $this);
}