line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Routes::Transparent; |
2
|
4
|
|
|
4
|
|
2334
|
use strict; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
141
|
|
3
|
4
|
|
|
4
|
|
17
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
98
|
|
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
17
|
use Moo; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
22
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Routes'; |
7
|
4
|
|
|
4
|
|
2311
|
use Articulate::Syntax::Routes; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
22
|
|
8
|
4
|
|
|
4
|
|
2849
|
use Articulate::Service; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
13
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
get '/zone/:zone_id/article/:article_id' => sub { |
11
|
|
|
|
|
|
|
my ($self, $request) = @_; |
12
|
|
|
|
|
|
|
my $zone_id = $request->params->{'zone_id'}; |
13
|
|
|
|
|
|
|
my $article_id = $request->params->{'article_id'}; |
14
|
|
|
|
|
|
|
$self->service->process_request( |
15
|
|
|
|
|
|
|
read => { |
16
|
|
|
|
|
|
|
location => "zone/$zone_id/article/$article_id", |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
}; |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
post '/zone/:zone_id/article/:article_id' => sub { |
22
|
|
|
|
|
|
|
my ($self, $request) = @_; |
23
|
|
|
|
|
|
|
my $zone_id = $request->params->{'zone_id'}; |
24
|
|
|
|
|
|
|
my $article_id = $request->params->{'article_id'}; |
25
|
|
|
|
|
|
|
my $content = $request->params->{'content'}; |
26
|
|
|
|
|
|
|
$self->service->process_request( |
27
|
|
|
|
|
|
|
create => { |
28
|
|
|
|
|
|
|
location =>"zone/$zone_id/article/$article_id", |
29
|
|
|
|
|
|
|
content => $content, |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
}; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
post '/zone/:zone_id/article/:article_id/edit' => sub { |
35
|
|
|
|
|
|
|
my ($self, $request) = @_; |
36
|
|
|
|
|
|
|
my $zone_id = $request->params->{'zone_id'}; |
37
|
|
|
|
|
|
|
my $article_id = $request->params->{'article_id'}; |
38
|
|
|
|
|
|
|
my $content = $request->params->{'content'}; |
39
|
|
|
|
|
|
|
$self->service->process_request( |
40
|
|
|
|
|
|
|
update => { |
41
|
|
|
|
|
|
|
location =>"zone/$zone_id/article/$article_id", |
42
|
|
|
|
|
|
|
content => $content, |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
}; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
1; |