Use router constants
This commit is contained in:
parent
c9eca1edeb
commit
432206bc5b
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon\Accounts;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Util\HTTPInputData;
|
||||
|
@ -39,6 +40,6 @@ class UpdateCredentials extends BaseApi
|
|||
|
||||
Logger::info('Patch data', ['data' => $data]);
|
||||
|
||||
self::unsupported('patch');
|
||||
self::unsupported(Router::PATCH);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
|
@ -33,7 +34,7 @@ class Filters extends BaseApi
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
self::unsupported('post');
|
||||
self::unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon\Lists;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
|
@ -35,12 +36,12 @@ class Accounts extends BaseApi
|
|||
{
|
||||
public static function delete(array $parameters = [])
|
||||
{
|
||||
self::unsupported('delete');
|
||||
self::unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
public static function post(array $parameters = [])
|
||||
{
|
||||
self::unsupported('post');
|
||||
self::unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -74,7 +75,7 @@ class Accounts extends BaseApi
|
|||
if ($request['limit'] != 0) {
|
||||
$params['limit'] = min($request['limit'], 40);
|
||||
}
|
||||
|
||||
|
||||
$condition = ['gid' => $id];
|
||||
|
||||
if (!empty($request['max_id'])) {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
|
@ -33,7 +34,7 @@ class Markers extends BaseApi
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
self::unsupported('post');
|
||||
self::unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +35,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function delete(array $parameters = [])
|
||||
{
|
||||
self::unsupported('delete');
|
||||
self::unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +44,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function patch(array $parameters = [])
|
||||
{
|
||||
self::unsupported('patch');
|
||||
self::unsupported(Router::PATCH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -52,7 +53,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function post(array $parameters = [])
|
||||
{
|
||||
self::unsupported('post');
|
||||
self::unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -61,7 +62,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function put(array $parameters = [])
|
||||
{
|
||||
self::unsupported('put');
|
||||
self::unsupported(Router::PUT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -70,6 +71,6 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
self::unsupported('get');
|
||||
self::unsupported(Router::GET);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue