Save web app metadata explicitly
This commit is contained in:
parent
e508407df4
commit
e964e7e52c
@ -12,8 +12,6 @@ class AppCatalog::WebApp < ApplicationRecord
|
||||
validates :url, format: { with: URI.regexp },
|
||||
if: Proc.new { |a| a.url.present? }
|
||||
|
||||
before_create :update_metadata
|
||||
|
||||
def update_metadata
|
||||
AppCatalogManager::UpdateMetadata.call(self)
|
||||
end
|
||||
|
@ -24,6 +24,8 @@ module AppCatalogManager
|
||||
if apple_touch_icon = metadata.select_icon(purpose: "apple-touch-icon")
|
||||
attach_remote_image(:apple_touch_icon, apple_touch_icon)
|
||||
end
|
||||
|
||||
@app.save!
|
||||
rescue Manifique::Error => e
|
||||
msg = "Fetching web app manifest failed for #{e.url}: #{e.type}"
|
||||
Rails.logger.warn(msg)
|
||||
|
Loading…
x
Reference in New Issue
Block a user