Skip to content

Commit

Permalink
Merge pull request #1186 from metacpan/haarg/fix-perl-download-url
Browse files Browse the repository at this point in the history
fix download_url end point querying for releases
  • Loading branch information
oalders authored Apr 26, 2024
2 parents 9f07286 + 2c966bb commit 091a5fe
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/MetaCPAN/Query/Release.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ Sorting:
=cut

sub find_download_url {
my ( $self, $type, $module, $args ) = @_;
my ( $self, $type, $name, $args ) = @_;
$args ||= {};

my $dev = $args->{dev};
Expand Down Expand Up @@ -1059,7 +1059,10 @@ sub find_download_url {
must => [
{ term => { $prefix . 'authorized' => 1 } },
{ term => { $prefix . 'indexed' => 1 } },
{ term => { $prefix . 'name' => $module } },
(
$module_filter ? { term => { $prefix . 'name' => $name } }
: { term => { 'release' => $name } },
),
(
exists $version_filters->{must}
? @{ $version_filters->{must} }
Expand Down

0 comments on commit 091a5fe

Please sign in to comment.