diff --git a/lib/PoorBooru/API/V0.pm b/lib/PoorBooru/API/V0.pm index 3c81c05..81f0486 100644 --- a/lib/PoorBooru/API/V0.pm +++ b/lib/PoorBooru/API/V0.pm @@ -38,15 +38,13 @@ get "/meta" => sub { }; get "/tags" => sub { - my @tags = schema("default")->resultset("TagsCountView")->all; + my @tags = map +( { + id => $_->tag_id, + name => $_->name, + count => $_->count, + } ), schema("default")->resultset("TagsCountView")->all; - return [ - map +( { - id => $_->tag_id, - name => $_->name, - count => $_->count, - } ), @tags, - ]; + return \@tags; }; post "/tags/new" => sub {