protected function getDocument(User $actor, array $params)
{
$response = $this->api->send('Flarum\\Api\\Controller\\ShowDiscussionController', $actor, $params);
$statusCode = $response->getStatusCode();
if ($statusCode === 404) {
throw new RouteNotFoundException();
}
return json_decode($response->getBody());
}