|
|
|
|
@ -81,7 +81,6 @@ export const api = { |
|
|
|
|
if (block.type === 'text') { |
|
|
|
|
return { |
|
|
|
|
'type': 'text', |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': block.data.id ? block.data.id : null, |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
@ -95,7 +94,7 @@ export const api = { |
|
|
|
|
'type': 'image', |
|
|
|
|
'data': { |
|
|
|
|
'id': block.data.id ? block.data.id : null, |
|
|
|
|
'uuid': block.data.uuid, |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
'position': ++index, |
|
|
|
|
'title': block.data.title, |
|
|
|
|
'img': block.data.image_id, |
|
|
|
|
@ -106,7 +105,7 @@ export const api = { |
|
|
|
|
'type': 'image-text', |
|
|
|
|
'data': { |
|
|
|
|
'id': block.data.id ? block.data.id : null, |
|
|
|
|
'uuid': block.data.uuid, |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
'position': ++index, |
|
|
|
|
'title': block.data.title, |
|
|
|
|
'img': block.data.image_id, |
|
|
|
|
@ -118,7 +117,7 @@ export const api = { |
|
|
|
|
'type': 'images', |
|
|
|
|
'data': { |
|
|
|
|
'id': block.data.id ? block.data.id : null, |
|
|
|
|
'uuid': block.data.uuid, |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
'position': ++index, |
|
|
|
|
'title': block.data.title, |
|
|
|
|
'images': block.data.images.map((galleryImage) => { |
|
|
|
|
@ -134,7 +133,7 @@ export const api = { |
|
|
|
|
'type': 'video', |
|
|
|
|
'data': { |
|
|
|
|
'id': block.data.id ? block.data.id : null, |
|
|
|
|
'uuid': block.data.uuid, |
|
|
|
|
'uuid': block.uuid, |
|
|
|
|
'position': ++index, |
|
|
|
|
'title': block.data.title, |
|
|
|
|
'url': block.data.video_url, |
|
|
|
|
@ -275,9 +274,9 @@ export const api = { |
|
|
|
|
if (contentItem.type === 'text') { |
|
|
|
|
return { |
|
|
|
|
'type': 'text', |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': contentItem.id ? contentItem.id : null, |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'title': contentItem.title, |
|
|
|
|
'text': contentItem.txt, |
|
|
|
|
} |
|
|
|
|
@ -285,9 +284,9 @@ export const api = { |
|
|
|
|
} else if (contentItem.type === 'image') { |
|
|
|
|
return { |
|
|
|
|
'type': 'image', |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': contentItem.id ? contentItem.id : null, |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'title': contentItem.title, |
|
|
|
|
'image_id': contentItem.img.id, |
|
|
|
|
'image_url': contentItem.img.image, |
|
|
|
|
@ -296,9 +295,9 @@ export const api = { |
|
|
|
|
} else if (contentItem.type === 'image-text') { |
|
|
|
|
return { |
|
|
|
|
'type': 'image-text', |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': contentItem.id ? contentItem.id : null, |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'title': contentItem.title, |
|
|
|
|
'image_id': contentItem.img.id, |
|
|
|
|
'image_url': contentItem.img.image, |
|
|
|
|
@ -308,9 +307,9 @@ export const api = { |
|
|
|
|
} else if (contentItem.type === 'images') { |
|
|
|
|
return { |
|
|
|
|
'type': 'images', |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': contentItem.id ? contentItem.id : null, |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'title': contentItem.title, |
|
|
|
|
'images': contentItem.gallery_images.map((galleryImage) => { |
|
|
|
|
return { |
|
|
|
|
@ -324,9 +323,9 @@ export const api = { |
|
|
|
|
} else if (contentItem.type === 'video') { |
|
|
|
|
return { |
|
|
|
|
'type': 'video', |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'data': { |
|
|
|
|
'id': contentItem.id ? contentItem.id : null, |
|
|
|
|
'uuid': contentItem.uuid, |
|
|
|
|
'title': contentItem.title, |
|
|
|
|
'video_url': contentItem.url, |
|
|
|
|
} |
|
|
|
|
|