From ba099af4526cc517d467332209eda2745424b2ec Mon Sep 17 00:00:00 2001 From: Lucas Date: Wed, 8 Mar 2023 20:44:27 +0000 Subject: [PATCH] api: use tagged_media_view instead of media_tag --- lib/PoorBooru/API/V0/Controller/Tags.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/PoorBooru/API/V0/Controller/Tags.pm b/lib/PoorBooru/API/V0/Controller/Tags.pm index 74fdde5..45db618 100644 --- a/lib/PoorBooru/API/V0/Controller/Tags.pm +++ b/lib/PoorBooru/API/V0/Controller/Tags.pm @@ -71,12 +71,12 @@ sub show ($self) status => 404, ) if !defined($tag); - my $paged_media = $self->schema->resultset("MediaTag") + my $paged_media = $self->schema->resultset("TaggedMediaView") ->search({ tag_id => $tag->tag_id }, $MEDIA_SEARCH_OPTS) ->page($page); my @media = map +{ media_id => $_->media_id, - seaweedfs_fid => SeaweedFS::FID->from_bin($_->seaweedfs_fid), + seaweedfs_fid => SeaweedFS::FID->from_bin($_->media_seaweedfs_fid), }, $paged_media->all; return $self->render(json => {