Skip to content

Commit 82e5a35

Browse files
committed
Rename suggester method + endpoint
1 parent b875c47 commit 82e5a35

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

lib/MetaCPAN/Document/File/Set.pm

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -494,10 +494,7 @@ sub autocomplete {
494494
return $data;
495495
}
496496

497-
# this method will replace 'sub autocomplete' after the
498-
# mapping + data is fully deployed.
499-
# -- Mickey
500-
sub autocomplete_using_suggester {
497+
sub autocomplete_suggester {
501498
my ( $self, $query ) = @_;
502499
return $self unless $query;
503500

lib/MetaCPAN/Server/Controller/Search/Autocomplete.pm

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,10 @@ sub get : Local : Path('') : Args(0) {
1818
$self->model($c)->autocomplete( $c->req->param("q") ) );
1919
}
2020

21-
# this method will replace 'sub get' after the suggester
22-
# mapping + data is fully deployed and metacpan-web
23-
# is fully tested against it.
24-
# -- Mickey
25-
sub _get : Local : Path('/_get') : Args(0) {
21+
sub suggest : Local : Path('/suggest') : Args(0) {
2622
my ( $self, $c ) = @_;
2723
$c->stash_or_detach(
28-
$self->model($c)->autocomplete_using_suggester( $c->req->param("q") )
29-
);
24+
$self->model($c)->autocomplete_suggester( $c->req->param("q") ) );
3025
}
3126

3227
1;

0 commit comments

Comments
 (0)