rector: arrrrr

This commit is contained in:
Andras Bacsai
2025-01-07 14:52:08 +01:00
parent c702ebff6d
commit 16c0cd10d8
349 changed files with 4204 additions and 3712 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Livewire;
use App\Models\OauthSetting;
use Exception;
use Livewire\Component;
class SettingsOauth extends Component
@@ -33,6 +34,8 @@ class SettingsOauth extends Component
return $carry;
}, []);
return null;
}
private function updateOauthSettings(?string $provider = null)
@@ -41,7 +44,7 @@ class SettingsOauth extends Component
$oauth = $this->oauth_settings_map[$provider];
if (! $oauth->couldBeEnabled()) {
$oauth->update(['enabled' => false]);
throw new \Exception('OAuth settings are not complete for '.$oauth->provider.'.<br/>Please fill in all required fields.');
throw new Exception('OAuth settings are not complete for '.$oauth->provider.'.<br/>Please fill in all required fields.');
}
$oauth->save();
$this->dispatch('success', 'OAuth settings for '.$oauth->provider.' updated successfully!');
@@ -56,9 +59,11 @@ class SettingsOauth extends Component
{
try {
$this->updateOauthSettings($provider);
} catch (\Exception $e) {
} catch (Exception $e) {
return handleError($e, $this);
}
return null;
}
public function submit()