X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FApi%2FMastodon%2FStatuses%2FContext.php;h=6e35d717bf741d09bec7f51937beea1b1ff8edaa;hb=1b9ec3a2147fc10e4037ff1b2a7aac506cdf3b13;hp=c510fc9a8c4db6a967ae9f701fbfccd9bd3160a7;hpb=2bdb492834667ac14d4f3070b77b306cf441b174;p=friendica.git diff --git a/src/Module/Api/Mastodon/Statuses/Context.php b/src/Module/Api/Mastodon/Statuses/Context.php index c510fc9a8c..6e35d717bf 100644 --- a/src/Module/Api/Mastodon/Statuses/Context.php +++ b/src/Module/Api/Mastodon/Statuses/Context.php @@ -41,7 +41,7 @@ class Context extends BaseApi $uid = self::getCurrentUserID(); if (empty($this->parameters['id'])) { - DI::mstdnError()->UnprocessableEntity(); + $this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity()); } $request = $this->getRequest([ @@ -116,7 +116,7 @@ class Context extends BaseApi } DBA::close($posts); } else { - DI::mstdnError()->RecordNotFound(); + $this->logAndJsonError(404, $this->errorFactory->RecordNotFound()); } } @@ -140,7 +140,7 @@ class Context extends BaseApi $statuses['descendants'][] = DI::mstdnStatus()->createFromUriId($descendant, $uid, $display_quotes); } - System::jsonExit($statuses); + $this->jsonExit($statuses); } private static function getParents(int $id, array $parents, array $list = [])