Add basic request, response, and endpoint definitions for API
[MAILPOET-4135]
This commit is contained in:
14
mailpoet/lib/Automation/API/Response.php
Normal file
14
mailpoet/lib/Automation/API/Response.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace MailPoet\Automation\API;
|
||||
|
||||
use WP_REST_Response;
|
||||
|
||||
class Response extends WP_REST_Response {
|
||||
public function __construct(
|
||||
array $data = null,
|
||||
int $status = 200
|
||||
) {
|
||||
parent::__construct(['data' => $data], $status);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user