Add default sort

[MAILPOET-3065]
This commit is contained in:
Pavel Dohnal
2020-07-30 14:25:49 +02:00
committed by Veljko V
parent 08caad58f7
commit e430beb983

View File

@ -62,6 +62,8 @@ class Forms extends APIEndpoint {
}
public function listing($data = []) {
$data['sort_order'] = $data['sort_order'] ?? 'desc';
$data['sort_by'] = $data['sort_by'] ?? 'updated_at';
$listingData = $this->listingHandler->get('\MailPoet\Models\Form', $data);
$data = [];