Skip to content

Commit

Permalink
fix download_url end point querying for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Apr 25, 2024
1 parent 9f07286 commit 2c966bb
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 2c966bb

Please sign in to comment.