Save new templates image data to the new columns

[MAILPOET-2686]
This commit is contained in:
Rostislav Wolny
2021-10-15 12:47:47 +02:00
committed by Veljko V
parent f5e4bab40b
commit b51f7b2d0e
3 changed files with 10 additions and 2 deletions

View File

@@ -211,7 +211,7 @@ class NewsletterSend extends React.Component {
saveTemplate = (response, done) => {
const thumbnailPromise = this.getThumbnailPromise(response.meta.preview_url);
thumbnailPromise
.then((thumbnail) => {
.then((thumbnailData) => {
MailPoet.Ajax.post({
api_version: window.mailpoet_api_version,
endpoint: 'newsletterTemplates',
@@ -219,7 +219,7 @@ class NewsletterSend extends React.Component {
data: {
newsletter_id: response.data.id,
name: response.data.subject,
thumbnail,
thumbnail_data: thumbnailData,
body: JSON.stringify(response.data.body),
categories: '["recent"]',
},