refactor: change OauthSetting creation to updateOrCreate for better handling of existing records

This commit is contained in:
Andras Bacsai 2024-12-13 09:04:46 +01:00
parent 9832d92bda
commit 8a195c8cfb

View file

@ -58,7 +58,7 @@ public function run(): void
} }
} else { } else {
foreach ($providers as $provider) { foreach ($providers as $provider) {
OauthSetting::create([ OauthSetting::updateOrCreate([
'provider' => $provider, 'provider' => $provider,
]); ]);
} }