Skip to content

Commit 262b589

Browse files
committed
Fix
1 parent 5917a94 commit 262b589

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Console/Commands/EventHub/WebhookConfiguration.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,20 @@ protected function createOrUpdate($hook, $registered_hooks)
7474
{
7575
$topicName = $hook['topicName'];
7676

77-
// Not allowed in the POST/PUT body
78-
unset($hook['topicName']);
79-
8077
try {
8178
// If the hook exists on EventHub already, we don't need to touch the 'active' status.
8279
// But, new ones will require it.
8380
if (in_array($hook['topicName'], $registered_hooks) === false) {
8481
$hook['active'] = true;
8582

83+
// Not allowed in the POST/PUT body
84+
unset($hook['topicName']);
85+
8686
$this->webhook_api->create($topicName, $hook);
8787
} else {
88+
// Not allowed in the POST/PUT body
89+
unset($hook['topicName']);
90+
8891
$this->webhook_api->updateConfig($topicName, $hook);
8992
}
9093
} catch (EventHub\Exception\EventHubError $e) {

0 commit comments

Comments
 (0)