Skip to content

Commit 85fe36a

Browse files
committed
Proposed patch for issue 3235
Explicitly setting size to 500 to override the default size 250. https://metacpan.org/author/SYP
1 parent afb9fa5 commit 85fe36a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

lib/MetaCPAN/Web/Controller/Author.pm

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,10 @@ sub index : Chained('root') PathPart('') Args(0) {
5555
@{ $releases->{releases} };
5656
$c->res->last_modified($date) if $date;
5757

58-
my $faves = $c->model('API::Favorite')->by_user( $author->{user} )->get;
58+
# Issue: https://github.com/metacpan/metacpan-web/issues/3235
59+
# Explicitly setting size to 500 to override the default size 250.
60+
my $size = 500;
61+
my $faves = $c->model('API::Favorite')->by_user( $author->{user}, $size )->get;
5962

6063
my $profiles = $c->model('API::Author')->profile_data;
6164

lib/MetaCPAN/Web/Model/API/Favorite.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ sub by_user {
2424
$size ||= 250;
2525
return Future->done( [] )
2626
if !defined $user;
27-
return $self->request( "/favorite/by_user/$user", { size => $size } )
28-
->transform(
27+
return $self->request( "/favorite/by_user/$user", undef,
28+
{ size => $size } )->transform(
2929
done => sub {
3030
my $data = shift;
3131
return [] unless exists $data->{favorites};

0 commit comments

Comments
 (0)