Skip to content

Commit

Permalink
Merge pull request #64 from craftcms/bugfix/62-webhook-settings-webho…
Browse files Browse the repository at this point in the history
…ok-id

parse webhook id
  • Loading branch information
i-just authored Nov 27, 2024
2 parents 721f928 + e315d0e commit b7813e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/controllers/WebhooksController.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,12 @@ public function actionEdit(): YiiResponse
$webhookSigningSecret = $webhookRecord->webhookSigningSecret;

if (!empty($webhookId)) {
$parsedWebhookId = App::parseEnv($webhookRecord->webhookId);
try {
$response = $this->getWebhookInfo($plugin, $webhookId);
$response = $this->getWebhookInfo($plugin, $parsedWebhookId);
$webhookInfo = $response->toArray();
} catch (\Exception $e) {
Craft::error("Couldn't retrieve webhook with ID $webhookId: " . $e->getMessage());
Craft::error("Couldn't retrieve webhook with ID $parsedWebhookId: " . $e->getMessage());
$hasWebhook = false;
}
} else {
Expand Down

0 comments on commit b7813e8

Please sign in to comment.