mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-24 08:30:28 +00:00
update
This commit is contained in:
parent
c52d63b7af
commit
5fd2460aa2
2 changed files with 12 additions and 0 deletions
|
@ -8,6 +8,7 @@ use App\PhyreConfig;
|
|||
use App\UniversalDatabaseExecutor;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\Blade;
|
||||
use Modules\Email\App\Models\DomainDkim;
|
||||
use Modules\LetsEncrypt\Models\LetsEncryptCertificate;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
use Symfony\Component\Console\Input\InputArgument;
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Modules\Email\App\Http\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
use Modules\Email\App\Models\DomainDkim;
|
||||
use Modules\Email\DkimDomainSetup;
|
||||
|
||||
class DkimSetup extends Component
|
||||
|
@ -80,6 +81,16 @@ class DkimSetup extends Component
|
|||
public function secure()
|
||||
{
|
||||
$output = DkimDomainSetup::run($this->domain);
|
||||
if (isset($output['privateKey'])) {
|
||||
$findDomainDkim = DomainDkim::where('domain_name', $this->domain)->first();
|
||||
if (!$findDomainDkim) {
|
||||
$findDomainDkim = new DomainDkim();
|
||||
$findDomainDkim->domain_name = $this->domain;
|
||||
}
|
||||
$findDomainDkim->private_key = $output['privateKey'];
|
||||
$findDomainDkim->public_key = $output['text'];
|
||||
$findDomainDkim->save();
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue