Update src/Module/BaseApi.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2021-05-08 14:23:47 +02:00 committed by GitHub
parent 054f6dedc1
commit 31d70e02e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ class BaseApi extends BaseModule
{ {
$path = DI::args()->getQueryString(); $path = DI::args()->getQueryString();
Logger::info('Unimplemented API call', ['path' => $path, 'method' => $method]); Logger::info('Unimplemented API call', ['path' => $path, 'method' => $method]);
$error = DI::l10n()->t('API endpoint %s "%s" is not implemented', $method, $path); $error = DI::l10n()->t('API endpoint %s %s is not implemented', strtoupper($method), $path);
$error_description = DI::l10n()->t('The API endpoint is currently not implemented but might be in the future.');; $error_description = DI::l10n()->t('The API endpoint is currently not implemented but might be in the future.');;
$errorobj = new \Friendica\Object\Api\Mastodon\Error($error, $error_description); $errorobj = new \Friendica\Object\Api\Mastodon\Error($error, $error_description);
System::jsonError(501, $errorobj->toArray()); System::jsonError(501, $errorobj->toArray());