updated mailer endpoint

This commit is contained in:
Jonathan Labreuille
2016-08-08 17:41:30 +02:00
parent d7c5c8c3e7
commit 4950e47297
4 changed files with 29 additions and 35 deletions

View File

@ -6,12 +6,14 @@ if(!defined('ABSPATH')) exit;
class SuccessResponse extends Response {
public $data;
function __construct($data = array(), $meta = array(), $status = self::STATUS_OK) {
function __construct($data = null, $meta = null, $status = self::STATUS_OK) {
parent::__construct($status, $meta);
$this->data = $data;
}
function getData() {
if($this->data === null) return null;
return array(
'data' => $this->data
);