Skip to content

Commit

Permalink
use new /favorite/recent API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed Nov 25, 2016
1 parent 3737c39 commit aff5c76
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/MetaCPAN/Web/Model/API/Favorite.pm
Expand Up @@ -98,16 +98,9 @@ sub by_user {
}

sub recent {
my ( $self, $page, $page_size ) = @_;
$self->request(
'/favorite/_search',
{
size => $page_size,
from => ( $page - 1 ) * $page_size,
query => { match_all => {} },
sort => [ { 'date' => { order => 'desc' } } ]
}
);
my ( $self, $page, $size ) = @_;
$self->request( '/favorite/recent', undef,
{ size => $size, page => $page } );
}

sub leaderboard {
Expand Down

0 comments on commit aff5c76

Please sign in to comment.