Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
reverse_dependencies: update link to new API endpoint
  • Loading branch information
mickeyn committed Jun 25, 2017
1 parent 7958db2 commit 83709f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Client.pm
Expand Up @@ -313,7 +313,7 @@ sub _reverse_deps {

eval {
$res = $self->fetch(
'/search/reverse_dependencies/'.$dist,
"/reverse_dependencies/dist/$dist",
{
size => 5000,
query => { match_all => {} },
Expand All @@ -333,7 +333,7 @@ sub _reverse_deps {
};

return MetaCPAN::Client::ResultSet->new(
items => $res->{'hits'}{'hits'},
items => $res->{'data'},
type => 'release',
);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Client/ResultSet.pm
Expand Up @@ -65,7 +65,7 @@ sub next {
defined $result or return;

my $class = 'MetaCPAN::Client::' . ucfirst $self->type;
return $class->new_from_request( $result->{'_source'} || $result->{'fields'} );
return $class->new_from_request( $result->{'_source'} || $result->{'fields'} || $result );
}

sub aggregations {
Expand Down

0 comments on commit 83709f7

Please sign in to comment.