From d931d57373aa8bb8c008fa4b03e5c74adc8f03d5 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 8 Dec 2023 19:57:55 +0100 Subject: [PATCH] fix github change --- app/Livewire/Source/Github/Change.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Source/Github/Change.php b/app/Livewire/Source/Github/Change.php index 858562e2a..cfea6fe9d 100644 --- a/app/Livewire/Source/Github/Change.php +++ b/app/Livewire/Source/Github/Change.php @@ -88,7 +88,20 @@ public function submit() { try { $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->dispatch('success', 'Github App updated successfully.'); } catch (\Throwable $e) { @@ -98,7 +111,6 @@ public function submit() public function instantSave() { - $this->submit(); } public function delete()