Commit f2f6f773 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Rename Entities::ForkedFromProject to Entities::BasicProjectDetails

parent 98236881
...@@ -49,7 +49,7 @@ module API ...@@ -49,7 +49,7 @@ module API
expose :enable_ssl_verification expose :enable_ssl_verification
end end
class ForkedFromProject < Grape::Entity class BasicProjectDetails < Grape::Entity
expose :id expose :id
expose :name, :name_with_namespace expose :name, :name_with_namespace
expose :path, :path_with_namespace expose :path, :path_with_namespace
...@@ -67,7 +67,7 @@ module API ...@@ -67,7 +67,7 @@ module API
expose :shared_runners_enabled expose :shared_runners_enabled
expose :creator_id expose :creator_id
expose :namespace expose :namespace
expose :forked_from_project, using: Entities::ForkedFromProject, if: lambda{ |project, options| project.forked? } expose :forked_from_project, using: Entities::BasicProjectDetails, if: lambda{ |project, options| project.forked? }
expose :avatar_url expose :avatar_url
expose :star_count, :forks_count expose :star_count, :forks_count
expose :open_issues_count, if: lambda { |project, options| project.issues_enabled? && project.default_issues_tracker? } expose :open_issues_count, if: lambda { |project, options| project.issues_enabled? && project.default_issues_tracker? }
...@@ -382,7 +382,7 @@ module API ...@@ -382,7 +382,7 @@ module API
expose :version, :revision, :platform, :architecture expose :version, :revision, :platform, :architecture
expose :contacted_at expose :contacted_at
expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? } expose :token, if: lambda { |runner, options| options[:current_user].is_admin? || !runner.is_shared? }
expose :projects, with: Entities::ForkedFromProject do |runner, options| expose :projects, with: Entities::BasicProjectDetails do |runner, options|
if options[:current_user].is_admin? if options[:current_user].is_admin?
runner.projects runner.projects
else else
......
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