fix github change

This commit is contained in:
Andras Bacsai 2023-12-08 19:57:55 +01:00
parent 4e680deb93
commit d931d57373

View File

@ -88,7 +88,20 @@ public function submit()
{ {
try { try {
$this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret'); $this->github_app->makeVisible('client_secret')->makeVisible('webhook_secret');
$this->validate(); $this->validate([
'github_app.name' => 'required|string',
'github_app.organization' => 'nullable|string',
'github_app.api_url' => 'required|string',
'github_app.html_url' => 'required|string',
'github_app.custom_user' => 'required|string',
'github_app.custom_port' => 'required|int',
'github_app.app_id' => 'required|int',
'github_app.installation_id' => 'required|int',
'github_app.client_id' => 'required|string',
'github_app.client_secret' => 'required|string',
'github_app.webhook_secret' => 'required|string',
'github_app.is_system_wide' => 'required|bool',
]);
$this->github_app->save(); $this->github_app->save();
$this->dispatch('success', 'Github App updated successfully.'); $this->dispatch('success', 'Github App updated successfully.');
} catch (\Throwable $e) { } catch (\Throwable $e) {
@ -98,7 +111,6 @@ public function submit()
public function instantSave() public function instantSave()
{ {
$this->submit();
} }
public function delete() public function delete()