api: make /tag/:tag_id_or_name return more than media_id
This commit is contained in:
parent
def852261f
commit
b1f2e533c1
@ -74,7 +74,10 @@ sub show ($self)
|
|||||||
my $paged_media = $self->schema->resultset("MediaTag")
|
my $paged_media = $self->schema->resultset("MediaTag")
|
||||||
->search({ tag_id => $tag->tag_id }, $MEDIA_SEARCH_OPTS)
|
->search({ tag_id => $tag->tag_id }, $MEDIA_SEARCH_OPTS)
|
||||||
->page($page);
|
->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 => {
|
return $self->render(json => {
|
||||||
id => $tag->tag_id,
|
id => $tag->tag_id,
|
||||||
|
Loading…
Reference in New Issue
Block a user