mirror of
https://github.com/friendica/friendica
synced 2025-04-24 12:30:10 +00:00
Inherit ApiResponse
from Response
This commit is contained in:
parent
561aba18e3
commit
537b74f307
46 changed files with 326 additions and 277 deletions
|
@ -23,7 +23,6 @@ namespace Friendica\Module\Api\Mastodon\Accounts;
|
|||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\Core\Logger;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
use Friendica\Util\HTTPInputData;
|
||||
|
||||
|
@ -41,6 +40,6 @@ class UpdateCredentials extends BaseApi
|
|||
|
||||
Logger::info('Patch data', ['data' => $data]);
|
||||
|
||||
DI::apiResponse()->unsupported(Router::PATCH);
|
||||
$this->response->unsupported(Router::PATCH);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ class Filters extends BaseApi
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
$this->response->unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -25,7 +25,6 @@ use Friendica\App\Router;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\Api\ApiResponse;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
/**
|
||||
|
@ -37,12 +36,12 @@ class Accounts extends BaseApi
|
|||
{
|
||||
protected function delete()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::DELETE);
|
||||
$this->response->unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
protected function post(array $request = [], array $post = [])
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
$this->response->unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ class Markers extends BaseApi
|
|||
{
|
||||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
$this->response->unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -26,7 +26,6 @@ use Friendica\Core\System;
|
|||
use Friendica\Database\DBA;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Post;
|
||||
use Friendica\Module\Api\ApiResponse;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
/**
|
||||
|
@ -39,7 +38,7 @@ class ScheduledStatuses extends BaseApi
|
|||
self::checkAllowedScope(self::SCOPE_WRITE);
|
||||
$uid = self::getCurrentUserID();
|
||||
|
||||
DI::apiResponse()->unsupported(Router::PUT);
|
||||
$this->response->unsupported(Router::PUT);
|
||||
}
|
||||
|
||||
protected function delete()
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
namespace Friendica\Module\Api\Mastodon;
|
||||
|
||||
use Friendica\App\Router;
|
||||
use Friendica\DI;
|
||||
use Friendica\Module\BaseApi;
|
||||
|
||||
/**
|
||||
|
@ -35,7 +34,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
protected function delete()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::DELETE);
|
||||
$this->response->unsupported(Router::DELETE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +42,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
protected function patch()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::PATCH);
|
||||
$this->response->unsupported(Router::PATCH);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -51,7 +50,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
protected function post(array $request = [], array $post = [])
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::POST);
|
||||
$this->response->unsupported(Router::POST);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -59,7 +58,7 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
public function put()
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::PUT);
|
||||
$this->response->unsupported(Router::PUT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,6 +66,6 @@ class Unimplemented extends BaseApi
|
|||
*/
|
||||
protected function rawContent(array $request = [])
|
||||
{
|
||||
DI::apiResponse()->unsupported(Router::GET);
|
||||
$this->response->unsupported(Router::GET);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue