Move jsonError out of Factory\Api\Mastodon\Error->Unauthorized

This commit is contained in:
Hypolite Petovan 2023-10-11 09:24:13 -04:00
parent 7486ebdc10
commit 6a2ca1a6b6
4 changed files with 10 additions and 13 deletions

View file

@ -36,7 +36,7 @@ class VerifyCredentials extends BaseApi
$application = self::getCurrentApplication();
if (empty($application['id'])) {
DI::mstdnError()->Unauthorized();
$this->logErrorAndJsonExit(401, $this->errorFactory->Unauthorized());
}
$this->jsonExit(DI::mstdnApplication()->createFromApplicationId($application['id']));