mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
refactoring
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user