change RecordController.php
This commit is contained in:
parent
b9b1bcc2f4
commit
b1d422ae43
@ -40,7 +40,7 @@ class Record extends API
|
||||
$entity->host = $cfResult->name;
|
||||
$entity->type = $cfResult->type;
|
||||
$entity->content = $cfResult->content;
|
||||
$entity->ttl = $cfResult->ttl;
|
||||
$entity->ttl = (int) $cfResult->ttl;
|
||||
$entity->proxiable = $cfResult->proxiable ? "on" : "off";
|
||||
$entity->proxied = $cfResult->proxied ? "on" : "off";
|
||||
$entity->locked = "on";
|
||||
@ -75,14 +75,14 @@ class Record extends API
|
||||
public function update(\App\Entities\Cloudflare\API\RecordEntity $entity, array $fieldDatas): \App\Entities\Cloudflare\API\RecordEntity
|
||||
{
|
||||
//TTL값은 CDN(proxied)가 사용함일때는 무조건 1, 않함일때는 120이 적용
|
||||
|
||||
$options = [
|
||||
'type' => isset($fieldDatas['type']) ? $fieldDatas['type'] : $entity->type,
|
||||
'name' => isset($fieldDatas['host']) ? $fieldDatas['host'] : $entity->host,
|
||||
'content' => isset($fieldDatas['content']) ? $fieldDatas['content'] : $entity->content,
|
||||
'proxied' => $entity->proxied == 'on' ? true : false,
|
||||
'ttl' => $entity->ttl
|
||||
'ttl' => intval($entity->ttl)
|
||||
];
|
||||
//변경작업: 2024-08-09
|
||||
$options['proxied'] = $entity->proxied == 'on' ? true : false;
|
||||
if (isset($fieldDatas['proxied']) && $fieldDatas['proxied'] === 'on') {
|
||||
$options['proxied'] = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user