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

@@ -41,7 +41,7 @@ class Change extends Component
$github_app_uuid = request()->github_app_uuid;
$this->github_app = GithubApp::where('uuid', $github_app_uuid)->first();
if (!$this->github_app) {
return $this->redirectRoute('source.all', navigate: true);
return redirect()->route('source.all');
}
$settings = InstanceSettings::get();
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
@@ -67,7 +67,7 @@ class Change extends Component
$type = data_get($parameters, 'type');
$destination = data_get($parameters, 'destination');
session()->forget('from');
return $this->redirectRoute($back, [
return redirect()->route($back, [
'environment_name' => $environment_name,
'project_uuid' => $project_uuid,
'type' => $type,
@@ -117,7 +117,7 @@ class Change extends Component
{
try {
$this->github_app->delete();
return $this->redirectRoute('source.all', navigate: true);
return redirect()->route('source.all');
} catch (\Throwable $e) {
return handleError($e, $this);
}

View File

@@ -48,7 +48,7 @@ class Create extends Component
if (session('from')) {
session(['from' => session('from') + ['source_id' => $github_app->id]]);
}
return $this->redirectRoute('source.github.show', ['github_app_uuid' => $github_app->uuid], navigate: true);
return redirect()->route('source.github.show', ['github_app_uuid' => $github_app->uuid]);
} catch (\Throwable $e) {
return handleError($e, $this);
}