parameters['id'])) { $this->logAndJsonError(422, $this->errorFactory->UnprocessableEntity()); } if (!$post = Post::selectOriginal(['uri-id'], ['uri-id' => $this->parameters['id'], 'uid' => [0, $uid]])) { throw new HTTPException\NotFoundException('Item with URI ID ' . $this->parameters['id'] . ' not found' . ($uid ? ' for user ' . $uid : '.')); } $card = DI::mstdnCard()->createFromUriId($post['uri-id']); $this->jsonExit($card->toArray()); } }