Skip to content

Commit

Permalink
use _source not fields
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Sep 28, 2024
1 parent 10767e4 commit 17f0107
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions lib/MetaCPAN/V0Shim.pm
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,12 @@ sub release_data {
],
},
},
_source => [ 'stat' ],
fields => [ 'download_url', 'status', 'version' ],
_source => [ qw(
download_url
stat
status
version
) ],
};

my $ua = $self->ua;
Expand All @@ -437,10 +441,10 @@ sub release_data {
my $hits = $data->{hits}{hits} || die $data;

map +{
download_url => $_->{fields}{download_url},
status => $_->{fields}{status},
download_url => $_->{_sources}{download_url},
status => $_->{_source}{status},
stat => $_->{_source}{stat},
version => $_->{fields}{version},
version => $_->{_source}{version},
}, @$hits;
}

Expand Down

0 comments on commit 17f0107

Please sign in to comment.