]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Api/ApiResponse.php
Some more API functions moved
[friendica.git] / src / Module / Api / ApiResponse.php
index c0ce7c756b335b35c2ce3bc505c601c5ff735a26..9521e2270a6e2938ac875fc70ee4313b717f51ce 100644 (file)
@@ -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]]);
        }
 }