api: use tagged_media_view instead of media_tag
This commit is contained in:
parent
555a0bc1d1
commit
ba099af452
@ -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 => {
|
||||
|
Loading…
Reference in New Issue
Block a user