0
0
Fork 0

Use a helper to avoid using media/ asset prefixes (#28756)

This commit is contained in:
Renaud Chaput 2024-01-17 13:19:51 +01:00 committed by GitHub
parent baab58c80b
commit cb5ac15923
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 40 additions and 36 deletions

View file

@ -28,7 +28,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
}
else
{
url: full_pack_url('media/images/preview.png'),
url: frontend_asset_url('images/preview.png'),
}
end
end

View file

@ -33,7 +33,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
end
def thumbnail
instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url(:'@1x')) : full_pack_url('media/images/preview.png')
instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url(:'@1x')) : frontend_asset_url('images/preview.png')
end
def stats