| 1 | package Mojo::Darkpan::Controller::Index; | ||||||||||
| 2 | 2 | ▶ | use v5.20; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use Mojo::Base 'Mojolicious::Controller', -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use OrePAN2::Indexer; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | ▶ | use Data::Dumper; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use IO::Zlib; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | ▶ | use Mojo::Darkpan::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 4 | ▶ | sub list($self) { | ||||||||
|
Subroutine
list: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 10 | 4 | my $util = Mojo::Darkpan::Util->new(controller => $self); | |||||||||
| 11 | |||||||||||
| 12 | 4 | ▶ | $self->render(json => $util->list) if ($util->authorized); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | } | ||||||||||
| 14 | |||||||||||
| 15 | 2 | ▶ | sub reindex($self) { | ||||||||
|
Subroutine
reindex: called CC=2 SCAR=6.9
Pod
undocumented
| |||||||||||
| 16 | 2 | my $util = Mojo::Darkpan::Util->new(controller => $self); | |||||||||
| 17 | |||||||||||
| 18 | 2 | ▶ | return unless $util->authorized; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | |||||||||||
| 20 | 1 | $util->createIndex(); | |||||||||
| 21 | |||||||||||
| 22 | 1 | $self->render(text => 'reindexing scheduled, may take some time to complete...'); | |||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 2 | 1; | |||||||||