mirror of
https://github.com/friendica/friendica
synced 2025-04-27 01:10:14 +00:00
Move Api\unsupported tests and remove dependency to System::jsonExit()
This commit is contained in:
parent
c0219fe2fa
commit
e7f84d4934
5 changed files with 52 additions and 50 deletions
|
@ -4,8 +4,6 @@ namespace Friendica\Module\Api;
|
|||
|
||||
use Friendica\App\Arguments;
|
||||
use Friendica\Core\L10n;
|
||||
use Friendica\Core\System;
|
||||
use Friendica\Object\Api\Mastodon\Error;
|
||||
use Friendica\Util\Arrays;
|
||||
use Friendica\Util\HTTPInputData;
|
||||
use Friendica\Util\XML;
|
||||
|
@ -231,7 +229,7 @@ class ApiResponse
|
|||
]);
|
||||
$error = $this->l10n->t('API endpoint %s %s is not implemented', strtoupper($method), $path);
|
||||
$error_description = $this->l10n->t('The API endpoint is currently not implemented but might be in the future.');
|
||||
$errorobj = new Error($error, $error_description);
|
||||
System::jsonError(501, $errorobj->toArray());
|
||||
|
||||
$this->exit('error', ['error' => ['error' => $error, 'error_description' => $error_description]]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue