Merge pull request #1262 from mailpoet/recently-sent-templates
limitting the recently sent templates to 12 [MAILPOET-1265]
This commit is contained in:
@ -45,9 +45,12 @@ class NewsletterTemplates extends APIEndpoint {
|
||||
$data['id'] = $template['id'];
|
||||
}
|
||||
}
|
||||
|
||||
$template = NewsletterTemplate::createOrUpdate($data);
|
||||
$errors = $template->getErrors();
|
||||
|
||||
NewsletterTemplate::cleanRecentlySent($data);
|
||||
|
||||
if(!empty($errors)) {
|
||||
return $this->errorResponse($errors);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user