From 30f85d8e23566406e5f1d5108379c36bc88d6019 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 3 Mar 2023 09:09:04 +1100 Subject: [PATCH] Add logging around webhooks --- app/Http/ValidationRules/Project/ValidProjectForClient.php | 2 +- app/Jobs/Util/WebhookSingle.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/ValidationRules/Project/ValidProjectForClient.php b/app/Http/ValidationRules/Project/ValidProjectForClient.php index 51271985b7db..f887961626f2 100644 --- a/app/Http/ValidationRules/Project/ValidProjectForClient.php +++ b/app/Http/ValidationRules/Project/ValidProjectForClient.php @@ -48,7 +48,7 @@ class ValidProjectForClient implements Rule // $this->input['project_id'] = $this->decodePrimaryKey($this->input['project_id']); // } - $project = Project::find($this->input['project_id']); + $project = Project::withTrashed()->find($this->input['project_id']); if (! $project) { $this->message = 'Project not found'; diff --git a/app/Jobs/Util/WebhookSingle.php b/app/Jobs/Util/WebhookSingle.php index dc4f8314c39c..7be0f0feeebb 100644 --- a/app/Jobs/Util/WebhookSingle.php +++ b/app/Jobs/Util/WebhookSingle.php @@ -78,7 +78,7 @@ class WebhookSingle implements ShouldQueue $subscription = Webhook::with('company')->find($this->subscription_id); if ($subscription) { - nlog("firing event ID {$subscription->event_id}"); + nlog("firing event ID {$subscription->event_id} company_id {$subscription->company_id}"); } if (!$subscription) {