You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
573 B
21 lines
573 B
<?php
|
|
|
|
namespace App\Domains\Channel\Actions\AppProvisioning;
|
|
|
|
use App\Domains\Channel\DTOs\AppProvisioning\ProvisionConsumerAppDTO;
|
|
use App\Domains\Channel\Models\Client;
|
|
|
|
class ProvisionConsumerApp
|
|
{
|
|
public function execute(ProvisionConsumerAppDTO $dto): void
|
|
{
|
|
Client::create([
|
|
'name' => $dto->name,
|
|
'domain' => $dto->domain,
|
|
'webhook' => $dto->webhook_url,
|
|
'auth_type' => $dto->auth_type,
|
|
'credentials' => $dto->credentials,
|
|
'secret' => encrypt(uuid_create()),
|
|
]);
|
|
}
|
|
}
|
|
|