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

This commit is contained in:
Hypolite Petovan 2023-10-11 09:32:25 -04:00
parent 696c56b6be
commit 0a91484fa0
4 changed files with 7 additions and 10 deletions

View file

@ -92,7 +92,7 @@ class Apps extends BaseApi
}
if (!DBA::insert('application', $fields)) {
DI::mstdnError()->InternalError();
$this->logErrorAndJsonExit(500, $this->errorFactory->InternalError());
}
$this->jsonExit(DI::mstdnApplication()->createFromApplicationId(DBA::lastInsertId())->toArray());