refactoring

This commit is contained in:
Saeed Vaziry
2023-08-04 18:28:04 +02:00
parent 8444323cf4
commit 643318fcfc
349 changed files with 3189 additions and 2729 deletions

View File

@ -11,8 +11,12 @@ class Bitbucket extends Component
{
public string $token;
public ?string $url;
public function mount(): void
{
$this->url = request()->input('redirect') ?? null;
$this->token = SourceControl::query()
->where('provider', \App\Enums\SourceControl::BITBUCKET)
->first()?->access_token ?? '';
@ -23,6 +27,10 @@ public function connect(): void
app(ConnectSourceControl::class)->connect(\App\Enums\SourceControl::BITBUCKET, $this->all());
session()->flash('status', 'bitbucket-updated');
if ($this->url) {
$this->redirect($this->url);
}
}
public function render(): View