backend: reorder title setting and set title for tags#show
This commit is contained in:
parent
a4a845b459
commit
672192441d
@ -9,8 +9,6 @@ use SeaweedFS::FID;
|
||||
|
||||
sub index ($self)
|
||||
{
|
||||
$self->title("Pooru~");
|
||||
|
||||
my $v = $self->validation;
|
||||
my $page = $v->optional("page")->num(1, undef)->param // 1;
|
||||
|
||||
@ -23,6 +21,7 @@ sub index ($self)
|
||||
|
||||
return $self->render(status => $res->code) if $res->is_error;
|
||||
|
||||
$self->title("Pooru~");
|
||||
my @media = map +{
|
||||
media_src => $self->seaweed->url_for(
|
||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||
|
@ -9,8 +9,6 @@ use SeaweedFS::FID;
|
||||
|
||||
sub list ($self)
|
||||
{
|
||||
$self->title("tags");
|
||||
|
||||
my $v = $self->validation;
|
||||
my $page = $v->optional("page")->num(1, undef)->param // 1;
|
||||
|
||||
@ -21,6 +19,7 @@ sub list ($self)
|
||||
|
||||
return $self->render(status => $res->code) if $res->is_error;
|
||||
|
||||
$self->title("tags");
|
||||
my @tags = map +{
|
||||
name => $_->{name},
|
||||
count => $_->{count},
|
||||
@ -36,7 +35,6 @@ sub list ($self)
|
||||
|
||||
sub show ($self)
|
||||
{
|
||||
$self->title("tags");
|
||||
|
||||
my $v = $self->validation;
|
||||
my $page = $v->optional("page")->num(1, undef)->param // 1;
|
||||
@ -50,6 +48,7 @@ sub show ($self)
|
||||
|
||||
return $self->render(status => $res->code) if $res->is_error;
|
||||
|
||||
$self->title($res->json->{name});
|
||||
my @media = map +{
|
||||
media_src => $self->seaweed->url_for(
|
||||
SeaweedFS::FID->from_string($_->{seaweedfs_fid})
|
||||
|
Loading…
Reference in New Issue
Block a user