diff --git a/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php b/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php index d609cdaae..5051aec4e 100644 --- a/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php +++ b/src/Module/Api/Mastodon/Accounts/UpdateCredentials.php @@ -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); } } diff --git a/src/Module/Api/Mastodon/Filters.php b/src/Module/Api/Mastodon/Filters.php index 6c1506647..2b505e0f2 100644 --- a/src/Module/Api/Mastodon/Filters.php +++ b/src/Module/Api/Mastodon/Filters.php @@ -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); } /** diff --git a/src/Module/Api/Mastodon/Lists/Accounts.php b/src/Module/Api/Mastodon/Lists/Accounts.php index 6e10ad6bf..013a9f4aa 100644 --- a/src/Module/Api/Mastodon/Lists/Accounts.php +++ b/src/Module/Api/Mastodon/Lists/Accounts.php @@ -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'])) { diff --git a/src/Module/Api/Mastodon/Markers.php b/src/Module/Api/Mastodon/Markers.php index a3a3879e0..50c086499 100644 --- a/src/Module/Api/Mastodon/Markers.php +++ b/src/Module/Api/Mastodon/Markers.php @@ -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); } /** diff --git a/src/Module/Api/Mastodon/Unimplemented.php b/src/Module/Api/Mastodon/Unimplemented.php index fa9618818..035b6d2c9 100644 --- a/src/Module/Api/Mastodon/Unimplemented.php +++ b/src/Module/Api/Mastodon/Unimplemented.php @@ -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); } }