Replace some concatenations with interpolation
This commit is contained in:
parent
91d73cd314
commit
5a0b18feb8
@ -96,7 +96,7 @@ get "/tags" => sub {
|
|||||||
my @tags = map +{
|
my @tags = map +{
|
||||||
name => $_->{name},
|
name => $_->{name},
|
||||||
count => $_->{count},
|
count => $_->{count},
|
||||||
uri => uri_for("/tag/" . $_->{name}),
|
uri => uri_for("/tag/$_->{name}"),
|
||||||
}, @{$data->{tags}};
|
}, @{$data->{tags}};
|
||||||
|
|
||||||
template "tags" => {
|
template "tags" => {
|
||||||
@ -140,7 +140,7 @@ get "/media/:media_id" => sub {
|
|||||||
template "media" => {
|
template "media" => {
|
||||||
no_title => 1,
|
no_title => 1,
|
||||||
title => $data->{id},
|
title => $data->{id},
|
||||||
image_src => "$POORBOORU_API/download/" . $data->{id},
|
image_src => "$POORBOORU_API/download/$data->{id}",
|
||||||
media_id => $data->{id},
|
media_id => $data->{id},
|
||||||
media_filename => $data->{filename},
|
media_filename => $data->{filename},
|
||||||
media_size => $data->{size},
|
media_size => $data->{size},
|
||||||
@ -154,7 +154,7 @@ get "/random/media" => sub {
|
|||||||
|
|
||||||
my $data = decode_json($res->{content});
|
my $data = decode_json($res->{content});
|
||||||
# XXX body content.
|
# XXX body content.
|
||||||
redirect "/media/" . $data->{id};
|
redirect "/media/$data->{id}";
|
||||||
};
|
};
|
||||||
|
|
||||||
get "/random/tag" => sub {
|
get "/random/tag" => sub {
|
||||||
@ -163,7 +163,7 @@ get "/random/tag" => sub {
|
|||||||
|
|
||||||
my $data = decode_json($res->{content});
|
my $data = decode_json($res->{content});
|
||||||
# XXX body content.
|
# XXX body content.
|
||||||
redirect "/tag/" . $data->{id};
|
redirect "/tag/$data->{id}";
|
||||||
};
|
};
|
||||||
|
|
||||||
true;
|
true;
|
||||||
|
Loading…
Reference in New Issue
Block a user