Skip to content
Snippets Groups Projects
Unverified Commit 97b2104a authored by Arnaud Levy's avatar Arnaud Levy Committed by GitHub
Browse files

Merge pull request #1606 from noesya/screenshot-api

Gestion de l'API de capture d'écran
parents b5225ac9 a428ca2c
No related branches found
No related tags found
No related merge requests found
......@@ -59,8 +59,6 @@ class Admin::Communication::WebsitesController < Admin::Communication::Websites:
def update
if @website.update_and_sync(website_params)
# TODO better place, background job once w week?
@website.screenshot!
redirect_to [:admin, @website], notice: t('admin.successfully_updated_html', model: @website.to_s)
else
breadcrumb
......
......@@ -21,6 +21,7 @@ module Communication::Website::WithConnectedObjects
sync_with_git_without_delay
destroy_obsolete_git_files_without_delay
get_current_theme_version!
screenshot!
end
handle_asynchronously :clean_and_rebuild, queue: :cleanup
......
......@@ -23,6 +23,9 @@ class Screenshot
meta: false,
waitUntil: 'load',
device: 'Macbook Pro 15'
},
headers: {
'x-api-key' => ENV['MICROLINK_API_KEY']
}
})
data = JSON.parse(response.body)
......
......@@ -45,6 +45,8 @@ DEUXFLEURS_PASSWORD:
LIBRETRANSLATE_API_KEY:
MICROLINK_API_KEY:
MAINTENANCE: "false"
# Pour les tests automatisés
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment