Add LIST_OPERATORS case to handle operator listing requests
Some checks are pending
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
Some checks are pending
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions
This commit is contained in:
parent
0d6447f8df
commit
237af23690
1 changed files with 7 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
enum Method
|
enum Method
|
||||||
{
|
{
|
||||||
|
case LIST_OPERATORS;
|
||||||
case CREATE_OPERATOR;
|
case CREATE_OPERATOR;
|
||||||
case DELETE_OPERATOR;
|
case DELETE_OPERATOR;
|
||||||
case ENABLE_OPERATOR;
|
case ENABLE_OPERATOR;
|
||||||
|
@ -38,6 +39,10 @@
|
||||||
{
|
{
|
||||||
switch($this)
|
switch($this)
|
||||||
{
|
{
|
||||||
|
case self::LIST_OPERATORS:
|
||||||
|
// This method does not have a dedicated handler, it is handled by the main request handler
|
||||||
|
// in FederationServer::handleRequest()
|
||||||
|
break;
|
||||||
case self::GET_OPERATOR:
|
case self::GET_OPERATOR:
|
||||||
GetOperator::handleRequest();
|
GetOperator::handleRequest();
|
||||||
break;
|
break;
|
||||||
|
@ -86,8 +91,9 @@
|
||||||
$requestMethod === 'POST' && $path === '/' => null,
|
$requestMethod === 'POST' && $path === '/' => null,
|
||||||
|
|
||||||
preg_match('#^/attachment/([a-fA-F0-9\-]{36,})$#', $path) => Method::DOWNLOAD_ATTACHMENT,
|
preg_match('#^/attachment/([a-fA-F0-9\-]{36,})$#', $path) => Method::DOWNLOAD_ATTACHMENT,
|
||||||
($requestMethod === 'POST' | $requestMethod === 'PUT') && $path === '/attachment/upload' => Method::UPLOAD_ATTACHMENT,
|
($requestMethod === 'POST' || $requestMethod === 'PUT') && $path === '/attachment/upload' => Method::UPLOAD_ATTACHMENT,
|
||||||
|
|
||||||
|
($requestMethod === 'POST' || $requestMethod === 'GET') && $path === '/operators' => Method::LIST_OPERATORS,
|
||||||
$requestMethod === 'POST' && $path === '/operators/create' => Method::CREATE_OPERATOR,
|
$requestMethod === 'POST' && $path === '/operators/create' => Method::CREATE_OPERATOR,
|
||||||
preg_match('#^/operators/([a-fA-F0-9\-]{36,})$#', $path) && $requestMethod === 'POST' => Method::GET_OPERATOR,
|
preg_match('#^/operators/([a-fA-F0-9\-]{36,})$#', $path) && $requestMethod === 'POST' => Method::GET_OPERATOR,
|
||||||
preg_match('#^/operators/([a-fA-F0-9\-]{36,})/delete$#', $path) && $requestMethod === 'DELETE' => Method::DELETE_OPERATOR,
|
preg_match('#^/operators/([a-fA-F0-9\-]{36,})/delete$#', $path) && $requestMethod === 'DELETE' => Method::DELETE_OPERATOR,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue