Skip to content

Commit

Permalink
Added 'total' & 'took' to /release/interesting_files endpoint
Browse files Browse the repository at this point in the history
These values will simplify adoption by WEB
  • Loading branch information
mickeyn committed Jun 21, 2017
1 parent a323abe commit 7e1c9fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/MetaCPAN/Document/File/Set.pm
Expand Up @@ -676,7 +676,11 @@ sub interesting_files {
my $files = [ map { $_->{fields} } @{ $data->{hits}{hits} } ];
single_valued_arrayref_to_scalar($files);

return { files => $files };
return {
files => $files,
total => $data->{hits}{total},
took => $data->{took}
};
}

__PACKAGE__->meta->make_immutable;
Expand Down

0 comments on commit 7e1c9fe

Please sign in to comment.