Extract automation API to MailPoet REST API

[MAILPOET-4523]
This commit is contained in:
Jan Jakes
2022-09-09 15:19:46 +02:00
committed by John Oleksowicz
parent 1b5d6bd974
commit ba35ddf6e6
21 changed files with 190 additions and 104 deletions

View File

@ -0,0 +1,18 @@
<?php declare(strict_types = 1);
namespace MailPoet\API\REST;
class ErrorResponse extends Response {
public function __construct(
int $status,
string $message,
string $code
) {
parent::__construct(null, $status);
$this->set_data([
'code' => $code,
'message' => $message,
'data' => ['status' => $status],
]);
}
}