Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove the stargazer sub.
  • Loading branch information
Talina06 committed Jul 7, 2014
1 parent 7b0aa2b commit df1fed7
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions lib/MetaCPAN/Web/Controller/Pod.pm
Expand Up @@ -15,24 +15,17 @@ with qw(
sub root : Chained('/') PathPart('pod') CaptureArgs(0) {
}

sub stargazer : Chained('root') PathPart('') Args(1) {
my ( $self, $c, @path ) = @_;
my $user = $c->model('API::User')->get_profile( $c->token )->recv;
$c->stash( $c->model('API::Stargazer')->find_starred( $user, $path[0] ) );
$c->stash->{pod_file} = $c->model('API::Module')->find(@path)->recv;
$c->forward( 'view', [@path] );

}

# /pod/$name
sub find : Chained('root') PathPart('') Args(1) {
my ( $self, $c, @path ) = @_;

my $user = $c->model('API::User')->get_profile( $c->token )->recv;
$c->stash( $c->model('API::Stargazer')->find_starred( $user, $path[0] ) );

# TODO: Pass size param so we can disambiguate?
$c->stash->{pod_file} = $c->model('API::Module')->find(@path)->recv;

# TODO: Disambiguate if there's more than once match. #176

$c->forward( 'view', [@path] );
}

Expand Down

0 comments on commit df1fed7

Please sign in to comment.