Refactor fetching newsletter options to respect its type [MAILPOET-1431]

This commit is contained in:
Rostislav Wolny
2018-06-19 16:09:29 +02:00
parent 9446e3cd50
commit 9308cffd45
10 changed files with 45 additions and 37 deletions

View File

@ -25,8 +25,7 @@ class SendingQueue extends APIEndpoint {
);
// check that the newsletter exists
$newsletter = Newsletter::filter('filterWithOptions')
->findOne($newsletter_id);
$newsletter = Newsletter::findOneWithOptions($newsletter_id);
if($newsletter === false) {
return $this->errorResponse(array(