Skip to content

Commit

Permalink
Merge pull request #692 from metacpan/mickey/versions_ep_took_n_total
Browse files Browse the repository at this point in the history
Added 'total' & 'took' values to the /release/versions endpoint
  • Loading branch information
oalders committed Jun 21, 2017
2 parents 105eb86 + 42c9320 commit 60689f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/MetaCPAN/Document/Release.pm
Expand Up @@ -692,7 +692,11 @@ sub versions {
my $data = [ map { $_->{fields} } @{ $ret->{hits}{hits} } ];
single_valued_arrayref_to_scalar($data);

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

sub top_uploaders {
Expand Down

0 comments on commit 60689f9

Please sign in to comment.