line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Routes::Login; |
2
|
4
|
|
|
4
|
|
5099
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
144
|
|
3
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
94
|
|
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
19
|
use Moo; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
19
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Routes'; |
7
|
4
|
|
|
4
|
|
1645
|
use Articulate::Syntax::Routes; |
|
4
|
|
|
|
|
226
|
|
|
4
|
|
|
|
|
28
|
|
8
|
4
|
|
|
4
|
|
3279
|
use Articulate::Service; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
19
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
post '/login' => sub { |
11
|
|
|
|
|
|
|
my ($self, $request) = @_; |
12
|
|
|
|
|
|
|
my $user_id = $request->params->{'user_id'}; |
13
|
|
|
|
|
|
|
my $password = $request->params->{'password'}; |
14
|
|
|
|
|
|
|
my $redirect = $request->params->{'redirect'} // '/'; |
15
|
|
|
|
|
|
|
$self->service->process_request( |
16
|
|
|
|
|
|
|
login => { |
17
|
|
|
|
|
|
|
user_id => $user_id, |
18
|
|
|
|
|
|
|
password => $password |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
post '/logout' => sub { |
24
|
|
|
|
|
|
|
my ($self, $request) = @_; |
25
|
|
|
|
|
|
|
my $redirect = $request->params->{'redirect'} // '/'; |
26
|
|
|
|
|
|
|
$self->service->process_request( |
27
|
|
|
|
|
|
|
logout => {} |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
}; |