debian-mirror-gitlab/lib/api/entities/project_export_status.rb
2020-03-09 13:42:32 +05:30

20 lines
563 B
Ruby

# frozen_string_literal: true
module API
module Entities
class ProjectExportStatus < ProjectIdentity
include ::API::Helpers::RelatedResourcesHelpers
expose :export_status
expose :_links, if: lambda { |project, _options| project.export_status == :finished } do
expose :api_url do |project|
expose_url(api_v4_projects_export_download_path(id: project.id))
end
expose :web_url do |project|
Gitlab::Routing.url_helpers.download_export_project_url(project)
end
end
end
end
end