mirror of
https://github.com/friendica/friendica
synced 2025-04-27 21:10:11 +00:00
Move API Response methods into an own class to make them mockable
This commit is contained in:
parent
893b8e5df3
commit
319f91301d
22 changed files with 327 additions and 259 deletions
|
@ -22,6 +22,7 @@
|
|||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Module\Api\ApiResponse;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
/**
|
||||
|
@ -35,7 +36,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function delete(array $parameters = [])
|
||||
{
|
||||
self::unsupported(Router::DELETE);
|
||||
ApiResponse::unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -44,7 +45,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function patch(array $parameters = [])
|
||||
{
|
||||
self::unsupported(Router::PATCH);
|
||||
ApiResponse::unsupported(Router::PATCH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,7 +54,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function post(array $parameters = [])
|
||||
{
|
||||
self::unsupported(Router::POST);
|
||||
ApiResponse::unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -62,7 +63,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function put(array $parameters = [])
|
||||
{
|
||||
self::unsupported(Router::PUT);
|
||||
ApiResponse::unsupported(Router::PUT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -71,6 +72,6 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public static function rawContent(array $parameters = [])
|
||||
{
|
||||
self::unsupported(Router::GET);
|
||||
ApiResponse::unsupported(Router::GET);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue