Module: API::Helpers::ProjectSnapshotsHelpers
- Defined in:
- lib/api/helpers/project_snapshots_helpers.rb
Instance Method Summary collapse
- #authorize_read_git_snapshot! ⇒ Object
- #send_git_snapshot(repository) ⇒ Object
- #snapshot_project ⇒ Object
- #snapshot_repository ⇒ Object
Instance Method Details
#authorize_read_git_snapshot! ⇒ Object
8 9 10 |
# File 'lib/api/helpers/project_snapshots_helpers.rb', line 8 def authenticated_with_can_read_all_resources! end |
#send_git_snapshot(repository) ⇒ Object
12 13 14 15 16 |
# File 'lib/api/helpers/project_snapshots_helpers.rb', line 12 def send_git_snapshot(repository) header(*Gitlab::Workhorse.send_git_snapshot(repository)) body '' end |
#snapshot_project ⇒ Object
18 19 20 |
# File 'lib/api/helpers/project_snapshots_helpers.rb', line 18 def snapshot_project user_project end |
#snapshot_repository ⇒ Object
22 23 24 25 26 27 28 |
# File 'lib/api/helpers/project_snapshots_helpers.rb', line 22 def snapshot_repository if to_boolean(params[:wiki]) snapshot_project.wiki.repository else snapshot_project.repository end end |