Skip to content

Commit

Permalink
fix more feed queries
Browse files Browse the repository at this point in the history
  • Loading branch information
mickeyn committed May 24, 2016
1 parent f318f47 commit 7a7e266
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/MetaCPAN/Web/Controller/Feed.pm
Expand Up @@ -90,7 +90,10 @@ sub author : Local : Args(1) {
&& $c->model('API::Favorite')->by_user( $author_info->{user} );
my $faves_data
= $faves_cv
? [ map { $_->{fields} } @{ $faves_cv->recv->{hits}{hits} } ]
? [
map { single_valued_arrayref_to_scalar($_) }
map { $_->{fields} } @{ $faves_cv->recv->{hits}{hits} }
]
: [];

$c->stash->{feed} = $self->build_feed(
Expand All @@ -108,7 +111,10 @@ sub distribution : Local : Args(1) {
my $data = $c->model('API::Release')->versions($distribution)->recv;
$c->stash->{feed} = $self->build_feed(
title => "Recent CPAN uploads of $distribution - MetaCPAN",
entries => [ map { $_->{fields} } @{ $data->{hits}->{hits} } ]
entries => [
map { single_valued_arrayref_to_scalar($_) }
map { $_->{fields} } @{ $data->{hits}->{hits} }
]
);
}

Expand Down

0 comments on commit 7a7e266

Please sign in to comment.