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

@ -45,7 +45,7 @@ class Lists extends BaseApi
}
if (!Circle::remove($this->parameters['id'])) {
DI::mstdnError()->InternalError();
$this->logErrorAndJsonExit(500, $this->errorFactory->InternalError());
}
$this->jsonExit([]);
@ -68,7 +68,7 @@ class Lists extends BaseApi
$id = Circle::getIdByName($uid, $request['title']);
if (!$id) {
DI::mstdnError()->InternalError();
$this->logErrorAndJsonExit(500, $this->errorFactory->InternalError());
}
$this->jsonExit(DI::mstdnList()->createFromCircleId($id));