line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Articulate::Routes::TransparentPreviews; |
2
|
5
|
|
|
5
|
|
2458
|
use strict; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
163
|
|
3
|
5
|
|
|
5
|
|
21
|
use warnings; |
|
5
|
|
|
|
|
7
|
|
|
5
|
|
|
|
|
110
|
|
4
|
|
|
|
|
|
|
|
5
|
5
|
|
|
5
|
|
19
|
use Moo; |
|
5
|
|
|
|
|
5
|
|
|
5
|
|
|
|
|
32
|
|
6
|
|
|
|
|
|
|
with 'Articulate::Role::Routes'; |
7
|
5
|
|
|
5
|
|
1295
|
use Articulate::Syntax::Routes; |
|
5
|
|
|
|
|
8
|
|
|
5
|
|
|
|
|
29
|
|
8
|
5
|
|
|
5
|
|
3301
|
use Articulate::Service; |
|
5
|
|
|
|
|
9
|
|
|
5
|
|
|
|
|
24
|
|
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; |