Skip to content

Commit

Permalink
add a few comments about the new routes
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Nov 22, 2016
1 parent e6b9f0c commit 439f14f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/MetaCPAN/Server/Controller/Search/Web.pm
Expand Up @@ -13,6 +13,8 @@ with 'MetaCPAN::Server::Role::JSONP';
sub get { }
sub all { }

# The simple search avoids most of the input and output aggregation and munging and is therefore easier to reason about for say search optimization.

sub simple : Chained('/search/index') : PathPart('simple') : Args(0) {
my ( $self, $c ) = @_;
my $args = $c->req->params;
Expand All @@ -23,6 +25,8 @@ sub simple : Chained('/search/index') : PathPart('simple') : Args(0) {
$c->stash($results);
}

# The web endpoint is the primary one, this handles the front-end's user-facing search

sub web : Chained('/search/index') : PathPart('web') : Args(0) {
my ( $self, $c ) = @_;
my $args = $c->req->params;
Expand Down

0 comments on commit 439f14f

Please sign in to comment.