From b1f2e533c1e9b0ece205b847f8cacba71ca47ef7 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sun, 5 Mar 2023 21:08:13 +0000 Subject: [PATCH] api: make /tag/:tag_id_or_name return more than media_id --- lib/PoorBooru/API/V0/Controller/Tags.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/PoorBooru/API/V0/Controller/Tags.pm b/lib/PoorBooru/API/V0/Controller/Tags.pm index 906720f..74fdde5 100644 --- a/lib/PoorBooru/API/V0/Controller/Tags.pm +++ b/lib/PoorBooru/API/V0/Controller/Tags.pm @@ -74,7 +74,10 @@ sub show ($self) my $paged_media = $self->schema->resultset("MediaTag") ->search({ tag_id => $tag->tag_id }, $MEDIA_SEARCH_OPTS) ->page($page); - my @media = map { $_->media_id } $paged_media->all; + my @media = map +{ + media_id => $_->media_id, + seaweedfs_fid => SeaweedFS::FID->from_bin($_->seaweedfs_fid), + }, $paged_media->all; return $self->render(json => { id => $tag->tag_id,