Skip to content

Commit

Permalink
favorite/agg_by_distributions: 'user' --> optional param
Browse files Browse the repository at this point in the history
read_param is meant for mandatory params as it detaches when
value is not found.

In this case, 'user' is an optional param and always single-value,
so we don't need to use it.
  • Loading branch information
mickeyn committed Jul 27, 2017
1 parent 1a472ad commit 7b6608e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/MetaCPAN/Server/Controller/Favorite.pm
Expand Up @@ -79,7 +79,7 @@ sub agg_by_distributions : Path('agg_by_distributions') : Args(0) {
my ( $self, $c ) = @_;

my $distributions = $c->read_param('distribution');
my $user = $c->read_param('user');
my $user = $c->req->param('user'); # optional
my $data
= $self->model($c)->agg_by_distributions( $distributions, $user );

Expand Down

0 comments on commit 7b6608e

Please sign in to comment.