Extract automation API to MailPoet REST API
[MAILPOET-4523]
This commit is contained in:
committed by
John Oleksowicz
parent
1b5d6bd974
commit
ba35ddf6e6
18
mailpoet/lib/API/REST/Endpoint.php
Normal file
18
mailpoet/lib/API/REST/Endpoint.php
Normal file
@ -0,0 +1,18 @@
|
||||
<?php declare(strict_types = 1);
|
||||
|
||||
namespace MailPoet\API\REST;
|
||||
|
||||
use MailPoet\Validator\Schema;
|
||||
|
||||
abstract class Endpoint {
|
||||
abstract public function handle(Request $request): Response;
|
||||
|
||||
public function checkPermissions(): bool {
|
||||
return current_user_can('admin');
|
||||
}
|
||||
|
||||
/** @return array<string, Schema> */
|
||||
public static function getRequestSchema(): array {
|
||||
return [];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user