Skip to content

Proposed patch for issue 3235 #3337

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/MetaCPAN/Web/Controller/Author.pm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ sub index : Chained('root') PathPart('') Args(0) {
@{ $releases->{releases} };
$c->res->last_modified($date) if $date;

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

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

Expand Down
4 changes: 2 additions & 2 deletions lib/MetaCPAN/Web/Model/API/Favorite.pm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ sub by_user {
$size ||= 250;
return Future->done( [] )
if !defined $user;
return $self->request( "/favorite/by_user/$user", { size => $size } )
->transform(
return $self->request( "/favorite/by_user/$user", undef,
{ size => $size } )->transform(
done => sub {
my $data = shift;
return [] unless exists $data->{favorites};
Expand Down
Loading