line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Routes::TransparentPreviews; |
2
|
6
|
|
|
6
|
|
3350
|
use strict; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
360
|
|
3
|
6
|
|
|
6
|
|
32
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
132
|
|
4
|
|
|
|
|
|
|
|
5
|
6
|
|
|
6
|
|
20
|
use Moo; |
|
6
|
|
|
|
|
8
|
|
|
6
|
|
|
|
|
33
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Routes'; |
7
|
6
|
|
|
6
|
|
1551
|
use Articulate::Syntax::Routes; |
|
6
|
|
|
|
|
12
|
|
|
6
|
|
|
|
|
48
|
|
8
|
6
|
|
|
6
|
|
4723
|
use Articulate::Service; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
36
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
post '/zone/:zone_id/preview' => sub { |
11
|
|
|
|
|
|
|
my ( $self, $request ) = @_; |
12
|
|
|
|
|
|
|
my $zone_id = $request->params->{'zone_id'}; |
13
|
|
|
|
|
|
|
my $article_id = $request->params->{'article_id'}; |
14
|
|
|
|
|
|
|
return $self->process_request( |
15
|
|
|
|
|
|
|
error => { |
16
|
|
|
|
|
|
|
simple_message => 'Parameter article_id is required' |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
) unless defined $article_id and $article_id ne ''; |
19
|
|
|
|
|
|
|
my $content = $request->params->{'content'}; |
20
|
|
|
|
|
|
|
$self->process_request( |
21
|
|
|
|
|
|
|
preview => { |
22
|
|
|
|
|
|
|
location => "zone/$zone_id/article/$article_id", |
23
|
|
|
|
|
|
|
content => $content, |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
}; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
1; |