Read about our upcoming Code of Conduct on this issue

Commit ca64737d authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

api: add endpoint to trigger a remote mirror

--HG--
branch : heptapod
parent 7c8b1580ab07
......@@ -73,6 +73,18 @@ class RemoteMirrors < Grape::API::Instance
render_api_error!(result[:message], result[:http_status])
end
end
desc 'Trigger a single remote mirror' do
success Entities::RemoteMirror
end
params do
requires :mirror_id, type: String, desc: 'The ID of a remote mirror'
end
put ':id/remote_mirrors/:mirror_id/trigger' do
mirror = user_project.remote_mirrors.find(params[:mirror_id])
mirror.sync
end
end
end
end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment