debian-mirror-gitlab/lib/api/project_snapshots.rb

24 lines
616 B
Ruby
Raw Normal View History

2018-12-05 23:21:45 +05:30
# frozen_string_literal: true
2018-05-09 12:01:36 +05:30
module API
2021-01-03 14:25:43 +05:30
class ProjectSnapshots < ::API::Base
2018-05-09 12:01:36 +05:30
helpers ::API::Helpers::ProjectSnapshotsHelpers
before { authorize_read_git_snapshot! }
2021-01-29 00:20:46 +05:30
feature_category :source_code_management
2018-05-09 12:01:36 +05:30
resource :projects do
desc 'Download a (possibly inconsistent) snapshot of a repository' do
detail 'This feature was introduced in GitLab 10.7'
end
params do
optional :wiki, type: Boolean, desc: 'Set to true to receive the wiki repository'
end
get ':id/snapshot' do
send_git_snapshot(snapshot_repository)
end
end
end
end