cfmgrv4 init...4
This commit is contained in:
parent
06b3d86372
commit
68d07ce53b
@ -58,16 +58,12 @@ class AuditLogService extends CloudflareService
|
|||||||
return $formDatas;
|
return $formDatas;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function auditlog_process(AuditLogEntity $entity): void
|
private function auditlog_process(AccountEntity $account_entity, AuditLogEntity $entity): void
|
||||||
{
|
{
|
||||||
//해당 Zone을 Sync작업한다
|
//auditlog의 domain에 해당하는 Zone이 존재하는지 확인
|
||||||
$this->getZoneModel()->where('domain', $entity->getZoneName());
|
$this->getZoneModel()->where('domain', $entity->getZoneName());
|
||||||
$zone_entity = $this->getZoneModel()->getEntity();
|
$zone_entity = $this->getZoneModel()->getEntity();
|
||||||
if ($zone_entity !== null) {
|
if ($zone_entity !== null) {
|
||||||
$account_entity = $this->getAccountModel()->getEntityBYPK($zone_entity->getParent());
|
|
||||||
if ($account_entity === null) {
|
|
||||||
throw new \Exception("Account: [{$zone_entity->getParent()}] 정보를 찾을수 없습니다.");
|
|
||||||
}
|
|
||||||
//해당 Zone만 Sync작업을 한다.
|
//해당 Zone만 Sync작업을 한다.
|
||||||
$zone_service = new ZoneService();
|
$zone_service = new ZoneService();
|
||||||
$zone_entity = $zone_service->sync($account_entity, $zone_entity);
|
$zone_entity = $zone_service->sync($account_entity, $zone_entity);
|
||||||
@ -102,7 +98,7 @@ class AuditLogService extends CloudflareService
|
|||||||
if ($entity === null) {
|
if ($entity === null) {
|
||||||
$formDatas = $this->getArrayByResult($result);
|
$formDatas = $this->getArrayByResult($result);
|
||||||
$entity = $this->getModel()->create($formDatas);
|
$entity = $this->getModel()->create($formDatas);
|
||||||
$this->auditlog_process($entity);
|
$this->auditlog_process(entity: $account_entity, $entity);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
log_message("debug", var_export($result, true));
|
log_message("debug", var_export($result, true));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user