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

22 lines
579 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
2020-07-28 23:09:34 +05:30
class ProjectSnapshots < Grape::API::Instance
2018-05-09 12:01:36 +05:30
helpers ::API::Helpers::ProjectSnapshotsHelpers
before { authorize_read_git_snapshot! }
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