Adapt newsletter template selection to API change
This commit is contained in:
@@ -119,11 +119,11 @@ define(
|
|||||||
body: template.body
|
body: template.body
|
||||||
}
|
}
|
||||||
}).done(function(response) {
|
}).done(function(response) {
|
||||||
if(response === true) {
|
if(response.result === true) {
|
||||||
// TODO: Move this URL elsewhere
|
// TODO: Move this URL elsewhere
|
||||||
window.location = 'admin.php?page=mailpoet-newsletter-editor&id=' + this.props.params.id;
|
window.location = 'admin.php?page=mailpoet-newsletter-editor&id=' + this.props.params.id;
|
||||||
} else {
|
} else {
|
||||||
response.map(function(error) {
|
response.errors.map(function(error) {
|
||||||
MailPoet.Notice.error(error);
|
MailPoet.Notice.error(error);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user