Sync Frontdesk queue integration flag with Ladill Queue on enable.
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Deploy Ladill Frontdesk / deploy (push) Successful in 50s
Mirror Care fix so provision and settings keep frontdesk_enabled in sync. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -46,11 +46,23 @@ class QueueClient
|
||||
*/
|
||||
public function enable(string $owner, string $organizationName, ?string $branchName = null): array
|
||||
{
|
||||
$response = $this->http($owner)->post($this->base().'/integrations/provision', array_filter([
|
||||
$this->http($owner)->post($this->base().'/integrations/provision', array_filter([
|
||||
'organization_name' => $organizationName,
|
||||
'branch_name' => $branchName,
|
||||
'industry' => 'visitor',
|
||||
]));
|
||||
]))->throw();
|
||||
|
||||
return $this->syncIntegration($owner, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function syncIntegration(string $owner, bool $enabled = true): array
|
||||
{
|
||||
$response = $this->http($owner)->patch($this->base().'/integrations', [
|
||||
'frontdesk_enabled' => $enabled,
|
||||
]);
|
||||
$response->throw();
|
||||
|
||||
return (array) ($response->json('data') ?? []);
|
||||
|
||||
Reference in New Issue
Block a user