Add element type of customfield to API response

This commit is contained in:
Ivan Nieto Vivanco 2022-06-09 12:57:20 -05:00
parent 728338bfa8
commit 4a0eb2b3f1

View file

@ -102,6 +102,8 @@ class AssetsTransformer
'field' => e($field->convertUnicodeDbSlug()), 'field' => e($field->convertUnicodeDbSlug()),
'value' => e($value), 'value' => e($value),
'field_format' => $field->format, 'field_format' => $field->format,
'element' =>$field->element,
]; ];
} else { } else {
@ -109,6 +111,7 @@ class AssetsTransformer
'field' => e($field->convertUnicodeDbSlug()), 'field' => e($field->convertUnicodeDbSlug()),
'value' => e($asset->{$field->convertUnicodeDbSlug()}), 'value' => e($asset->{$field->convertUnicodeDbSlug()}),
'field_format' => $field->format, 'field_format' => $field->format,
'element' =>$field->element,
]; ];