$uid = self::getCurrentUserID();
if (empty($this->parameters['id'])) {
- DI::mstdnError()->UnprocessableEntity();
+ $this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity());
}
$request = $this->getRequest([
}
DBA::close($posts);
} else {
- DI::mstdnError()->RecordNotFound();
+ $this->logAndJsonError(404, $this->errorFactory->RecordNotFound());
}
}
$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 = [])